ez.no / exponential / documentation / reference / template operators / variables / count
$input|count()
Integer.
This operator returns the count of the input value.
If the data is an array, the element count is returned.
If the data is an object, the object attribute count is returned.
If the data is a string, the string length is returned.
If the data is a numeric, the value itself is returned.
If the data is a boolean, false results in 0 and true results 1.
For all other data 0 is returned.
{array( 1, 2, 5 )|count}
returns 3.
log in or create a user account to comment.
Comments