[ad_1]
Use >=, not <=:
for($i = 6; $i >= -60; $i-=6){
echo $i; echo '</br>';
}
Note that >= is greater than or equal, and <= is less than or equal.
[ad_2]
solved For loop is not working in negative values in PHP
[ad_1]
Use >=, not <=:
for($i = 6; $i >= -60; $i-=6){
echo $i; echo '</br>';
}
Note that >= is greater than or equal, and <= is less than or equal.
[ad_2]
solved For loop is not working in negative values in PHP