?php / / this $a = array( 'color '= 'red', 'taste' = 'sweet', 'shape '= 'round', 'name' = 'apple', 4 / / key will be 0); / / is completely equivalent with $a['color'] = 'red'; $a['taste'] = 'sweet'; $a['shape'] = 'round'; $a['name'] = 'apple'; $a[] = 4; / / key will be 0 $b[] = 'a'; $b[] = 'b'; $b[] = 'c'; / / will result in the array array(0 = 'a ', 1 = 'b', 2 = 'c'), / / or simply array('a', 'b', 'c')?
Exemple 7-9.