I want to get a solution in PHP to get unique array based on sub array bases. Like this
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
)
)
to
Array
(
[0] => Array
(
[0] => 1227
[1] => 146
[2] => 1
[3] => 39
)
[1] => Array
(
[0] => 1228
[1] => 146
[2] => 1
[3] => 39
)
)
I mean to say array[1]
should be removed as array[0]
and array[1]
are the same. I tried to use array_unique
but it didn't work for me.