2.5.2. array()

array array ( array definition )

Creates an array. The array definition specifies the content of the array and consists of pairs key => value separated with commas.

Example 2.10. Creating simple arrays

{@array is array('title' => 'A title', 'author' => 'Johnny', 'body' => 'A body.')}
<h3>{@array.title}</h3>
<p>By {@array.author}</p>
<p>{@array.body}</p>

To give the values autoindexes, specify only the first (numerical) key and next insert only the values separated by commas:

Example 2.11. Autoindex

{@array is array(0 => 'value1', 'value2', 'value3', 'value4')}

Like in PHP, there might be both numerical and alphanumerical keys in one array.