PHP array_diff_key() Function

The array_diff_key() function is used to compare the keys from an array against the keys from another array and returns the difference. This function is like array_diff() except the comparison is done on the keys instead of the values.

An array containing all the entries from array1 whose keys are not present in any of the other arrays i.e. array2, array3 etc..

Parameter Description
array1 Required. The array to compare from
array2 Required. An array to compare against
array3,… Optional. More arrays to compare against






Array ( [d] => Cooper ) 

Leave a Reply

Your email address will not be published. Required fields are marked *