I've successfully created comparisons between multiple arrays using array intersect:
$arr_1=array("cat","dog","pig");
$arr_2=array("owl","pig","cat");
$arr_3=array("pig","cat","owl");
$arr_i=array_intersect($arr_1,$arr_2,$arr_3);
print_r($arr_i);
Array ( [0] => cat [2] => pig )
My problem is, I can't always predict how many arrays will need to be "intersected" because users can choose between two and ten different lists to compare.
I've tried for hours to come up with a solution that uses VARIABLE VARIABLES for array names, but array_intersect doesn't seem to be able to take those kind of references.
Anyone else ever have this problem, and (hopefully) solve it?
Thanks if you can help.
NN