Mega Code Archive

 
Categories / Php / Data Type
 

Creates an array with keys a, b and c with values of 1, 2 and 3 as well as keys 0, 1 and 2 with values a, b, and c

<?     $myarray = array('a'=>1, 'a', 'b'=>2, 'b', 'c'=>3, 'c'); ?>