zip.php
Table of Contents
Functions
- zip() : string
- Build a document from an array of attribute keys and an array of values.
Functions
zip()
Build a document from an array of attribute keys and an array of values.
zip(string|array<string|int, mixed> $keys, string|array<string|int, mixed> $values) : string
Wraps the ArangoDB AQL function ZIP(keys, values). PHP arrays are emitted as JSON
array literals (json_encode); strings are passed through as raw AQL expressions
(e.g. doc.keys).
Example AQL usage:
ZIP(["a", "b"], [1, 2]) // returns {a: 1, b: 2}
Parameters
- $keys : string|array<string|int, mixed>
-
The attribute keys (array literal or AQL expression).
- $values : string|array<string|int, mixed>
-
The values, in the same order (array literal or AQL expression).
Tags
Return values
string —The formatted AQL expression.