Php Arrays Key Comparison
What is array_diff_key Function?
The "array_diff_key" function is used to compute the difference of arrays using keys for comparison.
In the above syntax "array1" is the array to be compared with, "array2" is the array which is to be compared, atleast two arrays should be there,"array 3" is optional.Comparison is done based on the key.
$a = array( 'x' => '1','y' => '2','g' => '3');
$b = array( 'x' => '4','y' => '5');
[g] => 3
In the above example x,y are similar keys, so "g" is displayed.