Error with for loop exercise


#1


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


I get this syntax error: Parse error: syntax error, unexpected ')', expecting ';' on line 9. I even copied the code in the hint!


<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>


#2

This exercise have a bug,,

If you copy and paste this one (same as your code but it will work,probably!)

      for ($i = 0; $i < 101; $i = $i + 10) {
echo $i;
}

If it does not work then try removing all spaces ..!


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.