array: Specifying with array()

Specifying with array()

An array can be created using the array() language construct.

The comma after the last array element is optional and can be omitted.

It takes any number of comma-separated key => value pairs as arguments.

Syntax

array(
    key  => value,
    key2 => value2,
    key3 => value3,
    ...
)

Related concepts

Specifying with array()

array: Specifying with array() — Structure map

Clickable & Draggable!

array: Specifying with array() — Related pages: