Answers for "how to reverse a loop php"

PHP
3

php foreach reverse

foreach(array_reverse($array) as $var) {
	echo $var // Will show in reversed order
}
Posted by: Guest on May-06-2020
0

php loop backwards through array

$array = array_reverse($array);
foreach($array as $currentElement) {}
Posted by: Guest on April-01-2020

Code answers related to "how to reverse a loop php"

Browse Popular Code Answers by Language