The array_udiff_uassoc() function compares two or more arrays, in two user-made functions, and returns an array containing the elements from the first array, if the user-made functions allow it. The first user-made function compares array keys, and the second compares array values, and both returns a numeric value, a positive number (1) if the returned array should contain this element, and 0, or a negative number (-1), if not.
|array1||Required. The first array is the array that the others will be compared with|
|array2||Required. An array to be compared with the first array|
|array3||Optional. An array to be compared with the first array|
|function1||Required. The name of the user-made function that compares the array keys|
|function2||Required. The name of the user-made function that compares the array values|
Tip: You can compare the first array with one array, or as many as you like.
Note: For comparison, the key is used in the first function and the value is used in the second. They are both user-made functions.
The output of the code above will be:
Your message has been sent to W3Schools.