October 2002
Intermediate to advanced
368 pages
7h 12m
English
PHP supports both numerical arrays (array items are indexed by their numerical order) as well as associative arrays (array items are indexed by named keys).
$a = array(1, 2, 3, 4);
//$a[0] = 1
//$a[1] = 2
//$a[2] = 3
//$a[3] = 4
$b = array("name"=>"Fred", "age" => 30);
//$b['name'] = "Fred"
//$b['age'] = 30
Read now
Unlock full access