Hi,
yes explode() will do the stuff you need.
In the loop (where you work with the results of
the SELECT command)
1) fill a new array with explode()
2) for each of the element of this array
2 bis) check to see if the name is not
already in a 2nd array
2 ter) if not, then add it to the 2nd array
3) loop for the next result of the SELECT command
step 2 bis) can be done like this
function verify_name($name)
{
global $second_array;
$found=0;
for $i=0 to $max_index
{
if ($second_array[$i] == $name)
{
$found = 1;
}
}
return ($found)
}
$max_index is the maximum number of names
in the 2nd array ; it need to be incremented
each time you add a new name to the 2nd array
(case 2 ter)
We can do more efficient things, but this
one is easy to understand/begin with.
Regards,
Hervé.