What I'm looking to do is compare two arrays and remove values that are found in both arrays.
such that:
Array1
(
[0] =&开发者_如何学Cgt; 12356
[1] => 34567
[2] => 67890
)
Array2
(
[0] => 12356
[1] => 66666
[2] => 22222
)
And the result that I need is
Array3
(
[0] => 12356
)
Wondering if there's a quick way to do this before I build some function to handle it.
$result = array_intersect($arr1, $arr2);
精彩评论