array_diff_uassoc

It computes the difference of arrays with additional index check which is performed by a user supplied callback function

Example

<?php
function fun1($arg1, $arg2){
if ($arg1 === $arg2)     return 0;
return ($arg1 > $arg2)? 1:-1;
}
echo “<pre>”;
$array1 = array(“a” => “PHP”, “b” => “ASP”, “c” => “JSP”, “VB”);
$array2 = array(“a” => “PHP”, “ASP”, “JSP”);
$array3 = array_diff_uassoc($array1, $array2, “fun1”);
print_r($array3);
?>

Output

Array
(
[b] => ASP
[c] => JSP
[0] => VB
)