Hey (again :).. This is the code I'm working on but can't figure out to the heck of me how to remove these duplicate "words"/strings...
A small sample of the output is added to the upload so you can see what I mean.. HELP!
ps: a few comments have been left there for testing.
$stmt = $pdo->prepare("select DISTINCT terms
from links WHERE terms LIKE ? GROUP BY terms");
$stmt->execute(array("$alpha%"));
// fetching rows into array
$data = $stmt->fetchAll();
//echo gettype($data);
foreach($data as $result_tag) {
$one = implode(', ',$result_tag) . "";
$two = strtok($one, ',')."<br>";
//echo gettype($two);
//echo strtolower($two);
$three = strtolower($two);
//print_r($three);
$string = implode(" ", array_unique(explode(" ", $three)));
//echo gettype($string);
echo $string;
}
exit();