I\'m trying to intersect an arbitrary number of PHP arrays, the count of which depends on a user provided parameter, each of which can have any number of elements.
F
Create a new empty array, add each of your arrays to that, then use call_user_func_array()
$wrkArray = array( $userArray1, $userArray2, $userArray3 ); $result = call_user_func_array('array_intersect',$wrkArray);