ez.no / exponential / documentation / reference / template operators / arrays / hash
hash( $key1, $value1 [, $key2, $value2 [, ... ] ] )
| Name | Type | Description | Required |
|---|---|---|---|
| key1 | string | Key for accessing value1 | yes |
| value1 | mixed | Value assosiated with key1 | yes |
| key2 | string | Key for accessing value2 | no |
| value2 | mixed | Value assosiated with key2 | no |
| ... |
Associative array.
Builds an associative array using the specified key/value pairs. Odd parameters are considered to be keys, and even parameters are values.
{hash( 1, 'one', 2, 'two', 3, 'three' }
returns a hash corresponding to the PHP array array( 1 => 'one', 2 => 'two', 3 => 'three' ).
Comments