array_intersect_uassoc

It finds the intersection of arrays with additional index check, compares indexes by a callback function

Example

<?php
echo “<pre>”;
$array1 = array(“a” => “asp”, “b” => “php”, “c” => “JSP”, “VB”);
$array2 = array(“a” => “ASP”, “B” => “php”, “JSP”, “VB”);
print_r(array_intersect_uassoc($array1, $array2, “strcasecmp”));
?>

Output

Array
(
[b] => php
)