Displaying the contents of an array using a loop : foreach Statement PHP

 
<?php
$shapes = array('S' => 'Cylinder',
                'N' => 'Rectangle',
                'A' => 'Sphere',
                'O' => 'Sphere',
                'P' => 'Rectangle');
foreach ($shapes as $key => $value) {
    print "The $key is a $value.<br />";
}
?>