How do I remove duplicates in an array?
If I have an array, let's say:
"test", "place", "park", "park", "test", "run"
I want to remove the duplicate values in the array so that each cell is unique:
"test", "place", "park", "run"
How can I accomplish this? Is there a function I can use for this?
Thanks!
Believe it or not: array_unique ().
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in
Nation
eBookworm.us
That did it! Thanks!
You know, I did come across that earlier. It didn't work for me, but I went back and tried it, and apparently I misspelled my variable.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks