📅  最后修改于: 2022-03-11 14:54:00.550000             🧑  作者: Mango
$haystack = array(...);
$target = array('foo', 'bar');
if(count(array_intersect($haystack, $target)) == count($target)){
// all of $target is in $haystack
}
if(count(array_intersect($haystack, $target)) > 0){
// at least one of $target is in $haystack
}