3/7 Stuck in infinite loop


At exercise 3/7, while writing a for loop, I accidentally wrote

  // Write your for loop below!
  for ($i = 0; $i < 110; $i + 10) {
      echo $i;

instead of

  // Write your for loop below!
  for ($i = 0; $i < 110; $i = $i + 10) {
      echo $i;

So now I'm trying to rewrite my code, but every time I load the page it is getting stuck in the infinite loop.

The bad thing is that codecademy remembers the code I wrote, so when I refresh the browser, the infinite loop starts again and I'm not able to change it.

I already tried using another browser, but the code is saved to my account, so no matter what I do, the infinite loop starts and I'm not able to remove it.

Is there a workaround?

Thanks in advance!!


I'm stuck too with this exact situation.


Here's a work around that worked for me. Break the php processing by changing <?php to <?ph (or whatever)
Then the php processor won't run and you can fix the syntax and then turn php back on..


Thanks Ellen,

It didn't work for me, because after a refresh the php processor started before I could change the code.

After a lot of trying, logging in with my phone, resetting the code and saving it worked for me, because the mobile interface didn't start the php processor.


After trying a lot of answers showed here i achieve the code just changing my language. Was set in Portuguese. I changed to English although the exercise is in English.

Codecademy just released the code when i did this.

Dont ask me why!


I just figured it out. I had the same trouble and i oppened that lesson in tho other browser.
I used Sfari instead of Firefox. Codeacademia save the code just in current browser's cookies.
We have to be more attantive to infine loops.


// Write your for loop below!
for($i = 0; $i< 110; $i= $i + 10) {
echo $i;



Nice catch on the $i = $i +10 bit.
I was still having problems because I was getting the loop error even before I finished typing the code. So I did the code on notepad, refreshed the screen, reset code and then pasted the code I did on notepad and it worked.


TrishInHouston: Brilliant. Where do you write the code to change language? I'm stuck in Spanish. If I change bottom right to English then Cntrl R to refresh browser, it doesn't save preference. Every time I change language, I have to repeat course material - nothing saves. Changed to FireFox per another FAQ. Fail #QuieroIngles


aaryak13 thank you you save my life


you save my life thank you


write 'for' at the last after writing whole program.. may your program will run.