a backwards counting forloop
<?php
// a array
$weekday = array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday");
// the for loop
for($i = 6; $i >= 0; $i = $i -1){
print ( "$weekday[$i]<br>" );
}
?>
a backwards counting forloop
<?php
// a array
$weekday = array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday");
// the for loop
for($i = 6; $i >= 0; $i = $i -1){
print ( "$weekday[$i]<br>" );
}
?>
Count Backwards With a For Loop
var myArray = [];
for (var i = 9; i > 0; i -= 2){
myArray.push(i);
}
console.log(myArray); // console output [ 9, 7, 5, 3, 1 ]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us