PHP:检查一个数组是否包含另一个数组的所有数组值 [英] PHP: Check if an array contains all array values from another array
本文介绍了PHP:检查一个数组是否包含另一个数组的所有数组值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$all = array
(
0 => 307,
1 => 157,
2 => 234,
3 => 200,
4 => 322,
5 => 324
);
$search_this = array
(
0 => 200,
1 => 234
);
我想找出 $ all
是否包含所有 $ search_this
值并返回 true
或 false
.有什么想法吗?
I would like to find out if $all
contains all $search_this
values and return true
or false
. Any ideas please?
推荐答案
查看 查看全文