I have an array like this
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
)
)
and i want to get
Array
(
[0] => Array
(
[id] => BA
[name] => British Airways
)
[1] => Array
(
[id] => LA
[name] => Lanchile
)
)
but after using array_unique function, all i have is
Array
(
[0] => Array
(
[id] => BA
[name] => British Airways
)
)
what am i doing wrong?
array_unique(my_array, SORT_REGULAR)
? – Copeland