count.php
Table of Contents
Functions
- count() : string
- Count the number of elements in an array.
Functions
count()
Count the number of elements in an array.
count(mixed $expression) : string
This helper wraps the ArangoDB AQL function COUNT(expression) which is
an alias for LENGTH(expression). It returns the number of elements in
the given array expression.
Example AQL usage:
COUNT(doc.tags) // returns number of elements in doc.tags
COUNT([1, 2, 3, 4]) // returns 4
Parameters
- $expression : mixed
-
Array expression to count elements of.
Tags
Return values
string —The formatted AQL expression.