ez.no / exponential / documentation / reference / template operators / variables / is_array
$input|is_array( test )
| Name | Type | Description | Required |
|---|---|---|---|
| test | any | Variable to check. | only if input is omitted |
true or false, see description for details.
This operator simply checks if a variable is an array or not. The operator returns true if the input or the first parameter is an array. If both input and parameter are supplied, it is the parameter that will be evaluated.
{let my_variable="Hehe" your_variable=array(1,2,3)} {$my_variable|is_array( $your_variable )} {/let}
The example above returns true.
{let my_variable="Hehe" your_variable=array(1,2,3)} {$your_variable|is_array( $my_variable )} {/let}
The example above returns false.
log in or create a user account to comment.
Comments