时间:2021-07-01 10:21:17 帮助过:17人阅读
$array1 = array('a', 'b', 'c', 'd');
$array2 = array('a', 'c');
$array3 = array_intersect($array1, $array2);
if($array3) {
echo '有交集';
}
?>
http://www.bkjia.com/PHPjc/322970.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322970.htmlTechArticle 代码如下:
?php $array1 = array('a', 'b', 'c', 'd'); $array2 = array('a', 'c'); $array3 = array_intersect($array1, $array2); if($array3) { echo '有交集'; } ?...