php reverse array shorthand code example
Example 1: php reverse array
$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);
var_dump($y);
Example 2: php foreach reverse
foreach(array_reverse($array) as $var) {
echo $var // Will show in reversed order
}