reverse.php
Table of Contents
Functions
- reverse() : string
- Reverse the elements of an array or characters in a string.
Functions
reverse()
Reverse the elements of an array or characters in a string.
reverse(mixed $anyArray) : string
This helper wraps the ArangoDB AQL function REVERSE(expression) which can
reverse both arrays and strings. For arrays, it reverses the order of elements.
For strings, it reverses the order of characters.
Example AQL usage:
REVERSE([1, 2, 3]) // returns [3, 2, 1]
REVERSE("hello") // returns "olleh"
REVERSE(doc.items) // reverses the order of items
Parameters
- $anyArray : mixed
-
Array or string expression to reverse.
Tags
Return values
string —The formatted AQL expression.