PHP ʖ²ἯTH
º/A
array_intersect
˵÷
=ד 1. array_intersect() =ד
$array1 = array ("a" = "green", "red", "blue"); $array2 = array ("b" = "green", "yellow", "red"); $result = array_intersect ($array1, $array2);
բʹµà$result ³Ɏª£º
Array ([a] = green [0] = red)
¾¯¸漯B
±¾º¯ʽԚ PHP 4.0.4 ʇ»µµģ¡
º/A
ưµ㼯A
array_intersect_assoc
ɏһ¼¶
array_key_exists