|<- [[Arrays]]|[[Arrays functions]] ->| ===== associative Arrays ===== -> an **object**-indexed collection of objects -> couples clé/valeur ==== compare ==== * array : * si l'ordre est important * associative array * si avoir un "reference label" est important $assoc = array(); // empty associated/regular array $assoc = array("first_name" => "Maurice", "last_name" => "Dupont"); echo $assoc["first_name"] . " " . $assoc["last_name"]; // "Maurice Dupont" $assoc["first_name"] = "José"; echo $assoc["first_name"] . " " . $assoc["last_name"]; // "José Dupont" $numbers = array(2,4,6); // identique à $numbers = array(0 => 2, 1 => 4, 2 =>6);