hoopplaya4 Posted August 2, 2009 Share Posted August 2, 2009 Hi, I'm wondering if there's something similar to array_unique, but for strings? For example, I have a string: $ids = "23,24,25,24,24,24"; Is there anyway to strip the string down so that it keeps the unique numbers separated by the commas? Thus, I would retrieve from the $ids above: 23,24,25. Thanks! Quote Link to comment Share on other sites More sharing options...
.josh Posted August 2, 2009 Share Posted August 2, 2009 you could explode it, use array_unique, and then implode it. Quote Link to comment Share on other sites More sharing options...
hoopplaya4 Posted August 2, 2009 Author Share Posted August 2, 2009 Sweet, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.