PHP array_reverse() function is used to reverse the order of the elements in an array. PHP array_reverse() function is PHP built-in function.
Syntax :
array_reverse (array $array , bool $preserve_keys = false);
Parameter,
$array : Required. It is input array.
$preserve_keys : Optional. Default value is false. If it set to true, numeric keys are preserved.
Return : It returns reversed array.
Let's see below example to understand php array_reverse() Function in details.
Comments