The array_diff_assoc() function used for compares the keys and values of one or more arrays, and returns the differences.
Syntax
array_diff_assoc(array1,array2,array3...);
Example
$array1 = array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");
$array2 = array("a"=>"red","b"=>"green","c"=>"blue");
print_r(array_diff_assoc($array1,$array2));
Output
Array ( [d] => yellow )
Copyright ©2022 coderraj.com. All Rights Reserved.