(PHP 4, PHP 5, PHP 7)
array_reverse — Return an array with elements in reverse order
array_reverse ( array $array [, bool $preserve_keys = false ] ) : array
Takes an input array
and returns a new array with the order of the elements reversed.
array
The input array.
preserve_keys
If set to true
numeric keys are preserved. Non-numeric keys are not affected by this setting and will always be preserved.
Returns the reversed array.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.array-reverse.php