I have this multidimensional array (called $values):
Array ( [0] => Array ( [0] => 5 [1] => 2 [2] =>
Not sure if this is what you want, as I didn't read all of that, but check out:
call_user_func_array('array_diff', $values)
Maybe that's what you want.