Re: Pulling unique data from database

From: Date: Mon, 02 Feb 2004 02:45:26 +0000
Subject: Re: Pulling unique data from database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176551@lists.php.net to get a copy of this message
On Sun, 2004-02-01 at 21:26, Richard Kurth wrote: > each time it looks at a new record it list all the languages that that > person speaks with a double pipe in between each language. > > What I need to do is find all the unique languages so I can generate a > list of languages that do not have any repeats in it. so the list above > would be English,Portuguese,Finnish,Japanese,German,Spanish in any > order Use explode (http://www.php.net/explode) to split the string and put it in an array for each row; joining them together to make one big array. Then use array_unique (http://www.php.net/array_unique) to remove the dupes. -- Adam Bregenzer adam@bregenzer.net

« previous php.general (#176551) next »