我有两个数组 $a 和 $b。
$a = Array
(
[0] => Array
(
[a] => 1
[d] => CONTACT
[f] => 2
)
)
and
$b = Array
(
[0] => Array
(
[a] => 1
[b] => 1
[c] => 4
[d] => CONTACT
[e] => 2012-08-07 05:56:18
[f] => 2
)
[1] => Array
(
[a] => 2
[b] => 3
[c] => 4
[d] => CONTACT
[e] => 2012-08-07 05:56:18
[f] => 1
)
[2] => Array
(
[a] => 2
[b] => 4
[c] => 4
[d] => CONTACT
[e] => 2012-08-07 05:56:18
[f] => 1
)
)
如果第一个数组的 a,d,f 字段与第二个数组匹配,我想删除第二个数组的父数组。在这种情况下,我想做。我unset($b[0]);
怎么能在没有循环的情况下做到这一点?如果不能,给我一个带有循环的解决方案。cakephp中有什么方法吗?