Accessing Array Elements
<?
$my_array = array();
$pets = array('A', 'B', 'C', 'D');
$person = array('R', 'W', 24, 'CA');
$customer = array('first' => 'R', 'last' => 'W', 'age' => 24, 'state' => 'CA');
print "<p>'$pets[0]'.</p>\n";
print "<p>$person[2].</p>\n";
print "<p>{$customer['age']}.</p>\n";
?>
Related examples in the same category