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

While Loops in PHP Forum

View Course » View Exercise

224 points
5606445d3e0ec8704c0005a3_736135581
Submitted by
Abdul Ahad
almost 2 years ago

won't even wait till the code is completed (3/7)

pops an error saying "**The program took too long to finish. Check your code for infinite loops and try again."
It is very irritating..!
it doesn't even allow me to complete my condition statement.. :(
But i can see the result when i click the full screen button..
i cant submit it though...


1 vote

permalink

You can make comments of every statement in a loop like this:
$number = 0;
//while ( $number <= 10):
// echo " " . $number;
// $number++;
//endwhile;
Than you select every // by holding down CTRL button, and delete them all at once, worked for me.

274 points
Cd5a9e7b1ddf0e2b0af3c7c5c88c9ce8?s=140&d=retro
Submitted by
Adara1803
almost 2 years ago

2 Comments

Cd5a9e7b1ddf0e2b0af3c7c5c88c9ce8?s=140&d=retro Adara1803 almost 2 years ago

Or even better use copy and paste everything from your exercise into notepad, finish it, and paste it over.
Or use /* comment before while, like: /* while... when you finish delete /*

Picture Mike Shiel almost 2 years ago

I finally used the cut and paste workaround, but I think the lesson should be fixed.


0 votes

permalink

oh wow, i tried refreshing many times, but to no use...
the problem got solved by accident when i refreshed and reset the code and quickly undid it by mistake...
happy accident..

224 points
5606445d3e0ec8704c0005a3_736135581
Submitted by
Abdul Ahad
almost 2 years ago