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

For Loops in PHP Forum

View Course » View Exercise

496 points
Picture
Submitted by
Ábĥijëet Kąrve
over 3 years ago

[Solved]Did you set the third part of your loop correctly (the part that counts up by 10s)?

The output is right but......why this error

for ($i=0;$i<=10;$i++){
            echo $i;
            }

The output is right. Can any body explain this error.

Oops, try again. Did you set the third part of your loop correctly (the part that counts up by 10s)? Make sure NOT to end this bit with a semicolon! (You only need semicolons for separating values.)


2 votes

permalink

It should count by 10, not by 1

775 points
57eb6a992ddfa3f658000043_348778925
Submitted by
Miriam Mostert
over 3 years ago

1 Comment

Picture Ábĥijëet Kąrve over 3 years ago

Thanks friend its solved now :D