Got stuck


#1

Hey guys,

I have been stuck on this exercise for over a week now and just can't find a wat to complete it.
It just keeps getting stuck when i open the exercise and i can't even change the code (permanent) cause it stucks everytime. Also on the forum here i find a lot of people having the same problem but there is no fix that works for me.
The code i have when it starts is :

<?php
for( $i = 0; $i < 100; $i + 10)
{
echo $i;
}

?>

Hope you guys can help me out a litte.


#2

The problem with you for condition is the increment section(third command).
What you want to do is update the value of $i in memory so you need to do this

$i = $i +10 or $i +=10

instead of doing

$i +10

like this

  <? php 
    for( $i = 0; $i <= 100; $i += 10)
    {
        echo " $i <br/>"; 
    }
  ?>

to make it work cut the code out and refresh the page and then paste it back


#3

I got stuck with the same problem, unable to change the code because the php processor started and got in an infinite loop, before I could change the code.

I logged on with my mobile, reset the code and saved it.


#4

Thank you, this worked for me. Stupid that i didnt saw it... Although it was kinda hard to remove the code before the website crashed. But it works now ^^


#5

The only good thing I learned here is to strengthen my nerves . Apart from this everything else is total garbage . I write absolutely valid and correct code which is executed successfully everywhere else , but here . No appropriate messages to tell you what's happening . The page loads for ages just to throw some irrelevant message . Not to mention that you're teaching people wrong things like the example of changing the array index - where there was no semicolon at the end . Somebody from your team urgently needs serious beginner lessons in programming .


#6

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.