using "foreach" makes stepping through ass. arrays easy. foreach is a newer addition to the language, so use "each" otherwise. "Foreach" is just a shortcut for using "reset" and "each". look at the definition of "foreach" on the phpsite for details.
you might have used a similar 'foreach' in perl, although the syntax was different.
<?
$a = array(
"apple" => array(
"color" => "red",
"taste" => "sweet",
"shape" => "round"
),
"orange" => array(
"color" => "orange",
"taste" => "tart",
"shape" => "round"
)
);
foreach ($a as $key => $val) {
echo $key, "<BR>";
foreach($val as $key2 => $val2) {
echo "--->", $key2, ":", $val2, "<BR>";
}
}
?>