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;
?>
Related examples in the same category