I am finding the intersection between two arrays $item
and $query
respectively:
Array ( [0] => twitter [1] => 1 [2] => 561522539340771328 [3] => Array ( ) )
Array ( [0] => dig [1] => twitter )
This is the code I have:
if (array_intersect ( $query, $item )) {
$intersection [] = $item;
}
Somehow it's returning the notice as defined on the title of this question. Either I'm too tired to notice what's wrong or I may be going mad, shouldn't it return Array ( [0] => twitter )
?