As seen in this other answer, there are several ways to iterate two same-sized arrays simultaneously; however, all of the methods have a rather significant pitfall. Here ar
1, 'b' => FALSE, 'c' => new DateTime() );
$arr2 = array( 'foo', TRUE, 7, 5 );
reset($arr1);
reset($arr2);
while ( (list($key, $val) = each($arr1))
&& (list($key2, $val2) = each($arr2))
) {
var_dump($val,$val2);
// or whatever you wanted to do with them
}
http://www.php.net/manual/en/function.each.php