Writing your first for loop. Code works, exercise wont recognize


#1


https://www.codecademy.com/courses/web-beginner-en-L83Do/0/3?curriculum_id=5124ef4c78d510dd89003eb8#


I have written the loop, its executes and 0-100 are displayed in the window, just like it asks me to. But I get an error that says oops lloks like nothing was echoed, even though it has. Any ideas?


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


#2

In this exercise, the PHP is wrapped in a <p></p> element. It also starts at 10, not zero.


#3

Hi,
I have the same problem. My code:

  <p>
  <?php
  // Write your for loop below!
  for ($i = 10 ; $i < 101 ; $i = $i + 10) {
    echo $i;
  }
  ?>
  </p>

(it is in HTML style)
and I see:

Oops, try again. Did you set the first part of your loop correctly (the part that starts the loop)? Don't forget your semicolon!

I don't know what's wrong..;/


#4

Try removing the space from before each semi-colon.


#5

Hi, it works now, thanks a lot!


#6