in_array
Checks if a value exists in an array.
Syntax
in_array(<val>, <haystack>)
| Parameter | Type | Description |
|---|---|---|
| val | Text | The Val string value. |
| haystack | Array | The Haystack value. |
Return values
Boolean
Usage
Checks if order country is in the specified list of countries.
in_array(orders.country, ['US', 'CA', 'UK'])