Learning PHP and MySQL
Example 06-03 Displaying one value from an array
<?php
$shapes=array('Soda Can' => 'Cylinder',
'Note Pad' => 'Rectangle',
'Apple' => 'Sphere',
'Orange' => 'Sphere',
'Phonebook' => 'Rectangle');
print "A note pad is a {$shapes['Note Pad']}.";
?>
Posted by on 08/07 at 10:19 AM
Next entry: Example 06-04 Display the contents of an array using a loop
Previous entry: Example 06-02 Creating an associative array of shapes