0
我有一个向用户显示在一个表中,在那里他们可以选择通过复选框项的多维数组。比较2个阵列并获得匹配的项目
时,他们已经检查了他们的项目,并提交,现在我已经得到了对应于原始子阵列的身份识别码密钥ID值的数组。
如何搜索原始数组,并创建只有匹配所选项目的一个新的阵列?
Array (
[0] => Array (
[myid] => 22
[Price] => Some price
[Title] => Some text
)
[1] => Array (
[myid] => 36
[Price] => Some price
[Title] => Some text
)
)
任何帮助将不胜感激!
喜欢的东西array_intersect()? http://php.net/manual/en/function.array-intersect.php – dukevin 2015-02-06 12:34:18