|
array_diff_uassocComputes the difference of arrays with additional index check which is performed by a user supplied callback function Description
array array_diff_uassoc
( array
$array1
, array $array2
[, array $...
], callable $key_compare_func
)
Compares Unlike array_diff_assoc a user supplied callback function is used for the indices comparison, not internal function. Parameters
Return Values
Returns an array containing all the entries from
Examples
Example #1 array_diff_uassoc example The "a" => "green" pair is present in both arrays and thus it is not in the output from the function. Unlike this, the pair 0 => "red" is in the output because in the second argument "red" has key which is 1.
<?php The above example will output: Array ( [b] => brown [c] => blue [0] => red ) The equality of 2 indices is checked by the user supplied callback function. Notes
See Also
|