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

For Loops in PHP Forum

View Course » View Exercise

328 points
80cd4aa4c501ed8f4cecb331f83535ae?s=140&d=retro
Submitted by
immanuelsegol
over 4 years ago

help !!!!! what is the problem with my code?

<?php
for($i = 110;$i > 45 ;$i = $i
- 5){
echo $i;
}

it ends up at 50 so what is the problem


1 vote

permalink

hey, you just have to read the instructions more carefully, it says to start counting at 50 going down to 5 so your variable should start at 50 and decrement by 5 each time till you reach the number 5, hope that helps

717 points
4e414f5609cab431aa6b7e4a095e2bbf?s=140&d=retro
Submitted by
ajpeterson1
over 4 years ago

1 Comment

80cd4aa4c501ed8f4cecb331f83535ae?s=140&d=retro immanuelsegol over 4 years ago

ahh lololo i hate when that happens to me thanks man!!