Hello,
I'm using array_intersect to compare some number of arrays. But, this function need to know what arrays need to be intersected, e.g: array_intersect($array1,$array2)...
My problem is that I don't know how many arrays will be created, each array is created by some script which ask database about something, and there can be two, three or more arrays... each array will have name like $array1, $array2, $array3.... And i don't know how to dynamically execute array_intersect to in result have e.g. this:
A) if 4 arrays : array_intersect($array1,$array2,$array3,$array4)
😎 if 3 arrays: array_intersect($array1,$array2,$array3)
Any sugestions ?