Array Operations, I will have a few functions, and I cannot find them in the manual. so I want to find a master who can help me to change it. & Lt ;? Php $ aarray (111,222,333,444,555,666,777); Unchanged $ a1array (aa, bb, cc, dd, ee, ff, gg); initial array $ a2array (a1a, bb, c array operation, I can't find a few functions and I can't find them in the manual, so I want to find someone who can help me.
$ A = array ('20160301', '20160301', '20160301', '20160301', '20160301', '20160301'); // unchanged
$ A1 = array ('A', 'BB ', 'CC', 'DD', 'ee', 'FF ', 'GG'); // initial array
$ A2 = array ('a1a ', 'BB', 'CC', 'd2d ', 'e3e', 'FF ', 'GG '); // a new array for a1 comparison
$ A3 = array_intersect_assoc ($ a1, $ a2); // compare two arrays, leaving the same; array ([1] => bb [2] => cc [5] => ff [6] => gg)
$ A4 = array ('1' => 'BBC ', '2' => 'CC', '5' => 'ff ', '6' => 'gg2'); // An Array for comparing a2.
$ A5 = array_intersect_assoc ($ a3, $ a4); // The result is Array ([2] => cc [5] => ff) // The Final same Array
//////// Want to use the a1-a5 to leave a different one? I don't know if there are any functions?
// If you want to leave a value different from the a1 value (a1a, d2d, e3e, bbc, gg2 ), at the same time, the $ a-$1 value corresponding to the key values of a1 is retained to form a unique array...
// What we want is the final requirement below? bytes
$ Gg = array ('1' => array ('20140901', 'AA', 'a1a '), '2' => array ('20160901', 'BB ', 'BBC '), '3' => array ('123', 'DD', 'd2d'), '4' => array ('123', 'ee ', 'e3e '), '5' => array ('000000', 'GG', 'gg2 '));
?>
------ Solution --------------------
Array_diff ()