PHP Ex 3 in For-Loops not working

php

#1

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:


#2

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.


#3

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?


#4

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.


#5

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


#6

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


#7

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


#8

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


#9

Hey!
I have exactly the same problem :frowning:


#10

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


#11

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:


#12

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.


#13