Answers for "reverse array, 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
4

php reverse array

$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);

var_dump($y);
Posted by: Guest on February-20-2020

Browse Popular Code Answers by Language