Simplified example:
$arr1 = array(1,12,22,44,56);
$arr2 = array(12,44);
$arrFinal = array_intersect($arr1, $arr2);
echo "<pre>".print_r($arrFinal, true);
Output:
Array
(
[1] => 12
[3] => 44
)
In this case, there are two values the smaller array set found in the larger one (the first is value 12 at element 1 in the large one, and the second value is 44 which is in element 3 in the large one. Obviously, those matches are stored into array $arrFinal.