I would like to now how to remove duplicates from a multi-dimensional array. I have an array which looks like this:
Array before
Array
(
[0] => Array
(
[0] => 'Hello'
[1] => 'Test'
)
[1] => Array
(
[0] => 'Friend'
[1] => 'Test'
)
[2] => Array
(
[0] => 'Hello'
[1] => 'Code'
)
[3] => Array
(
[0] => 'Hello'
[1] => 'Test'
)
[4] => Array
(
[0] => 'hello'
[1] => 'Test'
)
[5] => Array
(
[0] => 'Hello'
[1] => 'Test'
)
)
And i want it to look like this:
Array after
Array
(
[0] => Array
(
[0] => 'Hello'
[1] => 'Test'
)
[1] => Array
(
[0] => 'Friend'
[1] => 'Test'
)
[2] => Array
(
[0] => 'Hello'
[1] => 'Code'
)
[3] => Array
(
[0] => 'hello'
[1] => 'Test'
)
)
As you see, the third and fith element got removed because element zero is identical with them. What is the most efectiv way to solve this? Thank you.