I want to compare all the sub arrays in the $ids and I want to return only the numbers that show up in all three arrays, so it would return 3 and 4 as an array.
$ids = [
[1,2,3,4],
[2,3,4],
[3,4,5],
];
expecting it to return
array(3,4)
UPDATE: My apologies, I left out the detail that I would not know how many arrays would be in the associative array, it could be 2 sub arrays, other times it could be 5. I appreciate all the answers I have received.