For loop syntax bug?


#1

I am writing my first for loop and am getting a syntax error message

Parse error: syntax error, unexpected ')', expecting ';' on line 9

Below is my code. LIterally copied and pasted from the hint after I couldn't figure out why my code was giving the same error. Can someone tell me where I'm going wrong?


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


#2

your code is fine :slight_smile:

try after refresh your browser.
1.cut the code
2.refresh your browser
3.paste the code


#3

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