comparing multidimensional array
- by John K
Hello everyone,
I have the following array:
Array
(
[0] => Array
(
[0] => 87
[1] => 55
[2] => 85
[3] => 86
)
[1] => Array
(
[0] => 58
[1] => 84
)
[2] => Array
(
[0] => 58
)
)
This array above is an example. The actual array is of variable size, but structured like this. Basically, I'd like to run array_intersect on each second level array and grab the value (number) that is common between them. In this case, it would be 58.
I'm not quite sure where to start on this. Any advice?