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
Top |