Reverses the order of the elements in an array.
array_reverse() returns a new array with the elements from the input array in reverse order. As of PHP 4.0.3, an optional parameter can specify that the keys should be preserved. By default they are not preserved.
<?php
$array1 = array("a", "b", "c");
foreach (array_reverse($array1) as $element) {
print "$element ";
}
?>
c b a
array_reverse() is used to reverse an array.