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

For Loops in PHP Forum

View Course » View Exercise

1000 points
52efce2080ff3381870007a7_598405599
Submitted by
fifibro01
over 2 years ago

I don't know whats wrong with my code please HELP

For me my code looks correct but am not 100% sure so if you see any flaws in my code ill be more than happy to know. This is my code:

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

When I press Save & Submit this pops up:

Oops, try again. Did you start your
for loop with for (...) ?

I don't understand it so please help if you can. I've been stuck on this for a few hours now :'(


1 vote

permalink

everything seems good try clearing your cookies then try again infect i pasted your code on my browser and it worked

254 points
9066cc1e32c99e1ffec598f3053a280a?s=140&d=retro
Submitted by
lowshoulder
over 2 years ago

1 Comment

52efce2080ff3381870007a7_598405599 fifibro01 over 2 years ago

Thanks that actually helped, ill remember that next time something happens like this to me again :P


1 vote

permalink

I had this problem as well. I did a hard reload of the page and it worked. Personally i think that's a bit easier than clearing your cookies manually :P
In google chrome it's possible to do with CTRL + Shift + R or by rightclicking the reload button in the browser. I'm not sure how it's done in other browsers though.

150 points
12b186b4b78a37493d5073be93354cf6?s=140&d=retro
Submitted by
Bjørn Nørr Andersen
over 2 years ago


0 votes

permalink

Exactly same problem

249 points
Picture
Submitted by
Erik Cheung
over 2 years ago


0 votes

permalink

I used Google chrome and I didn't have to click CTRL + Shift + R or rightclick the reload button:D

885 points
55e88ded9113cb3d180001d7_407749440
Submitted by
smiley
over 2 years ago