PHP array_intersect_uassoc() Function

The array_intersect_uassoc() function is used to compare two or more arrays with an additional user supplied function (comparison function).The comparison function returns an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.The array_intersect_uassoc() function compares the keys and values of two (or more) arrays, and returns the matches.

Example -

Note: This function uses a user-defined function to compare the keys! This function compares the keys and values of two or more arrays, and return an array that contains the entries from array1 that are present in array2, array3, etc.

Example -