what if you did something like...
// this returns all stuff in table but you can always narrow the search
$result = MYSQL_QUERY("SELECT*FROM $table);
$rows = MYSQL_NUM_ROWS($result);
$i = 0;
$count = 0;
while($i < $rows) {
$row = MYSQL_RESULT($result,$i,"People");
$array = explode(" ",$row);
for($j = 0; $j < sizeof($array); $j++) {
$names[$count] = $array[$j];
$count++;
}// end for
$i++;
}// end while
// Then to get all unique values just do this
$names = array_unique($names);
I think this should work. I hope this is what you wanted.