Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myfunction($a,$b){
- if ($a===$b){
- return 0;
- }
- return ($a>$b)?1:-1;
- }
- $a1 = array("a"=>"red","b"=>"green","c"=>"blue");
- $a2 = array("d"=>"red","b"=>"green","e"=>"blue");
- $result = array_diff_uassoc($a1,$a2,"myfunction");
- print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement