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

For Loops in PHP Forum

View Course

605 points
364e301a2698c895190aecc9b665d4eb?s=140&d=retro
Submitted by
marmikpatel
over 2 years ago

why for loop section getting stuck?

I am stuck in for loop I tired changing browser still no progress.


1 vote

permalink

It seems this section is broken, as is the while loop section. I suspect it's because CodeCademy now executes the PHP code before you submit it, so it can easily get into an infinite loop.

CodeCademy needs to fix this.

861 points
90e9bc98b26014abcabb14974ee10d52?s=140&d=retro
Submitted by
Kelly Keller-Heikkila
over 2 years ago

5 Comments

478038f2d2756db79fb2f01281d8c51f?s=140&d=retro zigglr over 2 years ago

Yeah it's broken for me too. Can't continue with the course because it keeps crashing... Any idea if it will be fixed?

5b64169c11e1d50b977c3115ef99e745?s=140&d=retro Megan Meisberger over 2 years ago

Crashing for me, too. I hope they are working on this.

478038f2d2756db79fb2f01281d8c51f?s=140&d=retro zigglr over 2 years ago

It's happening for the functions part too. Hopefully they fix this course soon

Ca3979dfa37723aa6064e3c99f98a74b?s=140&d=retro Frode Mathiassen over 2 years ago

this whole php course has been pretty buggy in my experience. Got stuck on For loops.

C144f20aa3bd3e4b9e75f9a98753ff53?s=140&d=retro vaibhav10 over 2 years ago

yes i'm also stuck on for loop


0 votes

permalink

you just write your code in the other editor and copy it to codecademy !

601 points
24cbeb28ffeb061c662d51917349532f?s=140&d=retro
Submitted by
yscope
over 2 years ago


0 votes

permalink

Yeah, the fact that it is constantly attempting to execute your code as you type doesn't make a lot of sense for the PHP exercises. I assume it's doing this because it's using the same prebuilt interface it uses for the HTML courses. Makes sense given HTML, but when you've got a situation where a partially finished loop is an infinite loop, it gets frustrating. yscope's recommendation is great, but my editor is constantly stuck this way because it saved the progress on my partially written code, so even if I log out, close my browser, and come back, it's got my partially typed loop in there (with no incrementer, which is why it is infinite). It gets stuck in the loop and I cannot type under the loading symbol or anything...

1274 points
55ef9f05e39efe003c00002f_741702465
Submitted by
AeonGrey
over 2 years ago


0 votes

permalink

I found a way to get it unstuck.

  1. log out of codeacademy
  2. clear your browsers cache and cookies
  3. relog into codeacademy

The code window should now be set back to default.
Use yscope's method of typing your code in notepad or something similar first, then copying it in.

1274 points
55ef9f05e39efe003c00002f_741702465
Submitted by
AeonGrey
over 2 years ago