removeValues.php
Table of Contents
Functions
- removeValues() : string
- Remove all occurrences of multiple values from an array.
Functions
removeValues()
Remove all occurrences of multiple values from an array.
removeValues(string $anyArray, string $values) : string
This helper wraps the ArangoDB AQL function REMOVE_VALUES(anyArray, values)
which removes all occurrences of multiple specified values from an array.
The values parameter should be an array expression containing the values to remove.
Example AQL usage:
REMOVE_VALUES([1, 2, 3, 2, 4, 3], [2, 3]) // returns [1, 4]
REMOVE_VALUES(doc.tags, ["old", "deprecated"]) // removes multiple tags
Parameters
- $anyArray : string
-
Array expression to remove values from.
- $values : string
-
Array expression containing values to remove.
Tags
Return values
string —The formatted AQL expression.