几天来,我一直试图解决这个问题,但没有得到好的结果。我在 PHP (print_r) 中有这个多维对象数组:
Array
(
[3] => Array
(
[0] => stdClass Object
(
[productoId] => 16
)
[1] => stdClass Object
(
[productoId] => 21
)
[2] => stdClass Object
(
[productoId] => 22
)
)
[7] => Array
(
[0] => stdClass Object
(
[productoId] => 16
)
[1] => stdClass Object
(
[productoId] => 21
)
[2] => stdClass Object
(
[productoId] => 22
)
)
[6] => Array
(
[0] => stdClass Object
(
[productoId] => 16
)
[1] => stdClass Object
(
[productoId] => 17
)
)
)
我想获取所有数组中存在的重复值,例如:
stdClass Object
(
[productoId] => 16
)
但不是:
stdClass Object
(
[productoId] => 21
)
知道如何实现这一目标吗?