March 2002
Intermediate to advanced
528 pages
21h 29m
English
array
array array([mixed ...])
Creates an array using the parameters as elements in the array. By
using the => operator, you can specify specific
indexes for any elements; if no indexes are given, the elements are
assigned indexes starting from 0 and incrementing by one. The
internal pointer (see current
,
reset
, and next
) is set to the
first element.
$array = array("first", 3 => "second", "third", "fourth" => 4);Note: array is actually a language construct, used
to denote literal arrays, but its usage is similar to that of a
function, so it’s included here.