diff
English ['d?f] American ['d?f]
abbr.differential differential (of); difference different; differ different; differentiator differentiator
assoc
English ['?s?k] American ['?s?k]
abbr.associate make happen contact; unite; associated; association alliance
php array_diff_assoc() function syntax
Use: Used to compare the key names and key values ??of two (or more) arrays and return the difference.
Description: This function compares the key names and key values ????of two (or more) arrays, and returns a difference array, which includes everything in the compared array (array1), but Key names and values ??that are not in any other parameter array (array2 or array3, etc.).
Syntax: array_diff_assoc(array1,array2,array3...);
Parameters:
Parameters | Description |
array1 | < td width="301" valign="top" style="word-break: break-all;">Required, the first array to be compared with other arrays|
array2 | Required, the array to be compared with the first array |
array3 | Optional, array to compare with the first array | < /tr>
php array_diff_assoc() function example
"red","b"=>"green","c"=>"blue","d"=>"yellow"); $a2=array("a"=>"red","b"=>"green","c"=>"blue"); $result=array_diff_assoc($a1,$a2); print_r($result); ?>
Run instance?
Click the "Run instance" button to view Online examples