my code meets exactly as the question asked. It's a bug? where I wrong?
when I run my code show me this: It looks like you didn't add 'make' => 'BMW' to the associative array.
<?php // This is an array using integers as the indices. // Add 'BMW' as the last element in the array! $car = array(2012, 'blue', 5, 'BMW'); // This is an associative array. // Add the make => 'BMW' key/value pair! $assocCar = array('year' => 2012, 'colour' => 'blue', 'doors' => 5, 'make' => 'BMW'); // This code should output "BMW"... echo $car; echo '<br />'; // ...and so should this! echo $assocCar['make'];
Someone help me?