This forum is now read-only. Please use our new forums at

For Loops in PHP Forum

View Course » View Exercise

555 points
Submitted by
Doesn't Matter
almost 5 years ago

Whats wrong with my code

I THINK im doing this right but uh Codecademy says otherwise so... someone please fix my code.<html>
<title>Solo For Loop!</title>
// Write your for loop below!
for ($i=0; $i < 110; $i=$i+10;$i=50; $i > 0;$i=$i-5;) {
echo $i;

BTW it says "Oops, try again! It looks like nothing was echoed!"

2 votes


You have too many parameters, you should only have one set of 3 in a for loop. Remove the semicolon after the last part as well.

628 points
Submitted by
Timothy Trageser
almost 5 years ago

1 Comment

F0f59a6c22fa1a8774366a4d9cf17e6b?s=140&d=retro tahareal almost 5 years ago

remove all this ";$i=50; $i > 0;$i=$i-5;" and change the "echo $i;" to "echo $i "