Array_intersect function:
This function is used to computes the intersection of arrays
array array_intersect ( array array1, array array2 [, array …])
Example
<?php
$arr1 = array (”a” => “test1″, “test2″, “test3″);
$arr2 = array (”b” => “test2″, “test4″, “test1″);
$result = array_intersect ($arr1, $arr2);
print_r($result);
//result array will be like this
Array([a]=>test1 [0]=>test2)
?>
