How to display unique string variables?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
seahorse123
Forum Newbie
Posts: 8
Joined: Tue Sep 20, 2005 9:06 pm

How to display unique string variables?

Post by seahorse123 »

:?: Is there a function in php to remove the duplicate string variables, for example there is "abcd,ab,cd,abc,abc", how to change it to "abcd,ab,cd,abc"?thanks.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

look at the array functions

Edit: hint, array_unique()
seahorse123
Forum Newbie
Posts: 8
Joined: Tue Sep 20, 2005 9:06 pm

Post by seahorse123 »

Thanks very much, jshpro2.
Post Reply