Mega Code Archive

 
Categories / Php / Data Type
 

Using extract on an associative array

<?php $shapes = array('S' => 'Cylinder',                 'N' => 'Rectangle',                 'A' => 'Sphere',                 'O' => 'Sphere',                 'P' => 'Rectangle'); extract($shapes); echo $Apple; echo "<br />"; echo $Notepad; ?>