Help with arrays
Posted: Thu May 13, 2010 6:43 pm
Hi!
I have this script that generates a multiple array:array[x][y]
Depending on the user input the array can be 'x' can be 1 or more.
I want to use the array[x] with the array_intersect as inarray_intersect($array[0], $array[1], ...)
So I thought of doing:
for($k=0; $k < count($array); $k++)
{
$temp .= '$array['.$k.'],';
}
and then issuing:
array_intersect($temp) but obviously it doesn't work.
So my question is, how can I do this?
Cheers!
I have this script that generates a multiple array:
Code: Select all
Code: Select all
I want to use the array[x] with the array_intersect as in
Code: Select all
Code: Select all
Code: Select all
{
$temp .= '$array['.$k.'],';
}
Code: Select all
Code: Select all
Code: Select all
So my question is, how can I do this?
Cheers!