i want to use foreach function for 3 variables
i use this code in my page:
foreach (array_combine($online_order_name, $online_order_
for ($i = 0, $length = count($array1); $i < $length; $i++) {
list($a, $b, $c) = array($array1[$i], $array2[$i], $array3[$i]);
...
}
You should think about a better array structure though that doesn't require you to pull information from three different arrays. Something like:
$orders = array(
array('name' => 'Foo', 'q' => 'bar', 'third' => 'Baz'),
...
);