Hi I have 3 separate arrays with the exact same number of values - say 4.
eg.
array 1 = a,b,c,d
array 2 = red,blue,green,yellow
array 3 = jan,feb,mar,apr
is there a way I can loop through the values of all three arrays at once? as I need to construct an SQL insert statement for each value
eg
$query = insert a,red,jan
$query = insert b,blue,feb
.
.
.
Does that make sense?
I can loop through each one at a time like this:
while ( list($key, $val) = each($array1) ) {
//make query in here
}
But that's not going to work, I need to loop thorugh all 3 arrays at once. any ideas?
A