Possible Duplicate:
Multiple index variables in PHP foreach loop
Can we echo multiple arrays using single foreach statement?
Tried doing it in following way but wasn’t successful:
foreach($cars, $ages as $value1, $value2)
{
echo $value1.$value2;
}
assuming both arrays have the same amount of elements, this should work
if the arrays are not guaranteed to be the same length then you can do something like this
if you just want to join the two arrays, you can do it like this