array_intersect($a,$b)交集

1,'b'=>1,'c'=>2);
$b = array('a'=>1,2,3);
print_r(array_intersect($a,$b));
Array
(
    [a] => 1
    [b] => 1
    [c] => 2
)

你可能感兴趣的:(array_intersect($a,$b)交集)