嗨,我有如下所示的多维 php 数组,我只是想从这个数组中删除重复的对象。他们无论如何要在 php 中执行此操作吗?我只需要删除重复的 stdClass 对象。
Array
(
[0] => stdClass Object
(
[term_id] => 5
[name] => 4x4
[slug] => 4x4
[term_group] => 0
[term_taxonomy_id] => 5
[taxonomy] => ptd_vehicle_sub_cat
[description] =>
[parent] => 0
[count] => 2
)
[1] => stdClass Object
(
[term_id] => 4
[name] => Ultra High Performance
[slug] => ultra-high-performance
[term_group] => 0
[term_taxonomy_id] => 4
[taxonomy] => ptd_vehicle_sub_cat
[description] =>
[parent] => 0
[count] => 2
)
[2] => stdClass Object
(
[term_id] => 5
[name] => 4x4
[slug] => 4x4
[term_group] => 0
[term_taxonomy_id] => 5
[taxonomy] => ptd_vehicle_sub_cat
[description] =>
[parent] => 0
[count] => 2
)
[3] => stdClass Object
(
[term_id] => 4
[name] => Ultra High Performance
[slug] => ultra-high-performance
[term_group] => 0
[term_taxonomy_id] => 4
[taxonomy] => ptd_vehicle_sub_cat
[description] =>
[parent] => 0
[count] => 2
)
)