我想在 PHP 中获得一个解决方案,以获取基于子数组基础的唯一数组。像这样
Array
(
[0] => Array
(
[0] => 1227
[1] => 146
[2] => 1
[3] => 39
)
[1] => Array
(
[0] => 1227
[1] => 146
[2] => 1
[3] => 39
)
[2] => Array
(
[0] => 1228
[1] => 146
[2] => 1
[3] => 39
)
)
到
Array
(
[0] => Array
(
[0] => 1227
[1] => 146
[2] => 1
[3] => 39
)
[1] => Array
(
[0] => 1228
[1] => 146
[2] => 1
[3] => 39
)
)
我的意思是说 array[1]
应该删除,因为array[0]
和array[1]
都是一样的。我尝试使用array_unique
,但它对我不起作用。