Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting unique values in a string variable

Status
Not open for further replies.

jimoblak

Instructor
Joined
Oct 23, 2001
Messages
3,620
Location
US
I have a variable that is passed from another data source. The other data source is not capable of choosing distinct addresses:

$headers="joe@mail.com, bob@mail.com, david@mail.com, joe@mail.com, joe@mail.com";

Is there a simple way to eliminate the duplicate email addresses (joe@mail.com)? I can turn this into an array and apply array_unique and then return it back to a basic string but was hoping there might be another method.

- - picklefish - -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top