I currently have:
JavaScript
x
$i = 1;
while {
echo $i;
$i++;
}
And it shows:
1 2 3 4 etc..
How would I make it display backwards?
For example
4 3 2 1 etc..
I basically want to do the exact same thing but flip it around.
Advertisement
Answer
JavaScript
$i = 10;
while($i>0) {
echo $i;
$i--;
}