Move to foreach instead of while list each

Adding foreach($aHash as $key => $val);  instead of while(list($key,$val) = each($aHash));