input|choose( value1 [, value2 [, ... ] ] )
Name | Type | Description | Required |
---|---|---|---|
value1 | any | A variable/value of any kind. | Yes. |
value2 | any | Another variable/value of any kind. | No. |
This operator returns one of the parameters. The input parameter must be an integer that pinpoints exactly which parameter that should be returned. If the input parameter is zero, the operator will return the first parameter. If the input parameter is one, the operator will return the second parameter, and so on. If the offset is wrong, the operator will return FALSE.
{0|choose( 'apples', 'bananas', 'coconuts' )}
The following output will be produced: "apples".
{2|choose( 'apples', 'bananas', 'coconuts' )}
The following output will be produced: "coconuts".
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.