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

For Loops in PHP Forum

View Course » View Exercise

1193 points
4fea2bab07354400030433e5_602657016
Submitted by
Daniel Park
about 4 years ago

Can't pass

I'm getting the right result but this exercise seems to be broken as well as the one before.


3 votes

permalink

Got this one to work:
for ($i = 50; $i > 4; $i-= 5) {
echo $i.'';
}

1193 points
4fea2bab07354400030433e5_602657016
Submitted by
Daniel Park
about 4 years ago

1 Comment

5149d08ab62c4f245e002d6a_475950185 Zhao Peng about 4 years ago

this one is right.I used this and it worked.


1 vote

permalink

You can play around with this also:
for ($i = 50; $i >= 5; $i-= 5) {

1365 points
515aebc769200fa815001b4d_442020788
Submitted by
Istvan Nonn
about 4 years ago


0 votes

permalink

Same here!
Although I do it correctly, it seems like I didn't complete the lesson (just because I feel like I need those badges =/ )

581 points
Picture
Submitted by
Lincoln Lubrese
about 4 years ago


-1 votes

permalink

for ($i = 50; $i >= 5; $i -= 5) {
echo $i;
}

after a while trying it works

282 points
513f3de47c57f5aa12005691_251597575
Submitted by
Ariel Sartor
about 4 years ago