我有一个这样的数组
Array
(
[0] => Array
(
[id] => BA
[name] => British Airways
)
[1] => Array
(
[id] => BA
[name] => British Airways
)
[2] => Array
(
[id] => LA
[name] => Lanchile
)
[3] => Array
(
[id] => LA
[name] => Lanchile
)
[4] => Array
(
[id] => BA
[name] => British Airways
)
[5] => Array
(
[id] => BA
[name] => British Airways
)
)
我想得到
Array
(
[0] => Array
(
[id] => BA
[name] => British Airways
)
[1] => Array
(
[id] => LA
[name] => Lanchile
)
)
但是在使用 array_unique 函数之后,我所拥有的只是
Array
(
[0] => Array
(
[id] => BA
[name] => British Airways
)
)
我究竟做错了什么?