array_reverse() function reverses the order of the array elements. : array_reverse « Data Structure « PHP






array_reverse() function reverses the order of the array elements.

 
//The syntax is: array array_reverse(array array)

<?
$u = array ("A", "B", "C", "D");
$u = array_reverse ($u);
print_r($u);
?>
  
  








Related examples in the same category

1.Concisely reversing a string by word
2.Return an array with elements in reverse order
3.Reversing an Array Using array_reverse()
4.Reversing a string by word