PHP Ex 3 in For-Loops not working



I got stuck on the third exercise of for-Loops in php. This is the code I have but somehow when I click "Save & Submit" it just runs and never stops:

> <html>
>   <head>
>     <title>Solo For Loop!</title>
>   </head>
>   <body>
>     <p>
>       <?php
>       // Write your for loop below!
>         for ($i = 0; $i < 101; $i = $i + 10) {
>             echo $i;
>         }
>       ?>
>     </p>
>   </body>
> </html>

anyone who knows what the problem might be here??

thx for your help. :slightly_smiling:


Hi Kathara

I can't spot any problems with your code. When you say "it just runs and never stops" do you mean the "Save and Submit" button is not responding or are you receiving some kind of error?

If it's the former: copy your code, refresh the page and paste your code back in then see if it works.


No, I just hit the button, it activates but never finishes. Normally on Mac it would throw a message if there would be an infinite loop, but nothing happens. The button just turns blue without anything written in it. I already tried refreshing the page several times but it didn't work either. Could this be some sort of bug?


That sounds like it could be a server issue, but I'm having no problems submitting your code on my end. My only suggestions are to try another browser or (unfortunately) wait for a while and see if it resolves itself.


Ok, well, thank you for your help. :slightly_smiling:


Ok, I tested the same exercise in Chrome, still got the same "error".... (not even getting an error code... Nor a message to stop a never ending script (eg. infinite loops)....) Is this being solved?? @CodecademyModerators


The problem has been solved it seems. At least I could continue in the course now.... thanks!


i am also facing the same problem -_- unexpected " on line 8 though there is no " in line 8 :confused:


I have exactly the same problem :frowning:


I experienced the infinite loop on Google Chrome. Clearing cache and cookies solved the problem.


Lucky this worked for you. I had tried it with google chrome, which I had opened for the first time (so no need to clear cache nor cookies) but it still didn't work. :worried: :smile:


hi kathara,

Even i faced the same problem with some exercises. looks like the problem is with server. so try to logout and try it again.