Return an array in the reverse order:
The array_reverse() function returns an array in the reverse order.
Parameter | Description |
---|---|
array | Required. Specifies an array |
preserve | Optional. Specifies if the function should preserve the keys of the array or not.
Possible values:
|
Return Value: | Returns the reversed array |
---|---|
PHP Version: | 4+ |
Changelog: | The preserve parameter was added in PHP 4.0.3 |
Return the original array, the reversed array and the preserved array: