hash

Summary

Creates a hash (associative array).

Usage

hash( $key1, $value1 [, $key2, $value2 [, ... ] ] )

Parameters

NameTypeDescriptionRequired
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
...

Returns

Associative array.

Description

Builds an associative array using the specified key/value pairs. Odd parameters are considered to be keys, and even parameters are values.

Examples

{hash( 1, 'one',

      2, 'two',

      3, 'three' }

returns a hash corresponding to the PHP array array( 1 => 'one', 2 => 'two', 3 => 'three' ).

Comments

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
       array_sum
       append
       array
       array_append
       array_merge
       array_prepend
       begins_with
       compare
       contains
       ends_with
       explode
       extract
       extract_left
       extract_right
       hash
       implode
       insert
       merge
       prepend
       remove
       repeat
       reverse
       array_sum
       unique
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
10:32:18 am
by Balazs Halasy

Last updated

05/02/2004
3:31:33 pm
by Balazs Halasy

Authors

Balazs Halasy
Kåre Køhler Høvik



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.