@reverse
Return a new array with elements in reverse order.
Returns: array
Syntax
Section titled “Syntax”@reverse(arr)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr |
array |
Source array |
Examples
Section titled “Examples”# Reverse an arrayset $arr [1 2 3]set $rev @reverse($arr)See Also
Section titled “See Also”- @sort — sort by comparator