PHP array_diff_assoc() Function

The array_diff_assoc() function is used to compare an array against another array and returns the difference. Unlike array_diff() the array keys are also used in the comparison.

This function compares the keys and values of two (or more) arrays, and return an array that contains the entries from array1 that are not present in array2 or array3, etc.

Parameter Description
array1 The first array which will be compared with other arrays.
array2 Compared with the first array.
array3,… Compared with the first array.






Array ( [d] => Cooper ) 

Leave a Reply

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