Mega Code Archive

 
Categories / Php / Data Type
 

Displaying one value from an array

<?php $shapes = array('S' => 'Cylinder',                 'N' => 'Rectangle',                 'A' => 'Sphere',                 'O' => 'Sphere',                 'P' => 'Rectangle'); print "A notepad is a {$shapes['Notepad']}."; ?>