Skip to content
Advertisement

array_unique for multidimensional arrays

In case of one-dim array I can use array_unique to get unique entries. But which function should be used to work with two-dim arrays? For instance:

JavaScript

In the above example I need to delete non-unique rows based on column 0. As a result I should get first two entries, while the third entry should be deleted. How to do this?

Advertisement

Answer

Try this…

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement