array_diff_assoc()
array_diff_assoc - Computes the difference of arrays with additional index check
Syntax
array array_diff_assoc (
array $array1,
array $array2,
array $...)
Arguments
- array1 - The array to compare from
- array2 - An array to compare against
- ... - More arrays to compare against
Description
Compares array1 against array2 and returns the difference. Unlike array_diff() the array keys are used in the comparison.
Version
PHP 4.3.0, 5
Return value
Returns an array containing all the values from array1 that are not present in any of the other arrays.