I am trying to parse all duplicates out of a string to make a keyword list.
For example on a dynamic site with articles the keyword meta tag should have word that match the article, but without making everyone think of a list of keywords. I want to take the article strip html and common words and duplicate words to make the keyword list.
this code works fine for stiriping html and etc
global $title, $hometext;
$htmlless = check_html($hometext, $strip = nohtml);
$shortwords = ereg_replace('the|a|is|this|and|am|are|so|you|in', ' ',$htmlless);
$symbolLess = trim(ereg_replace('("|\?|!|😐.|(|)|;|\\)+', ' ', $shortwords));
$keywords = ereg_replace('( |'.CHR(10).'|'.CHR(13).')+', ',', $symbolLess);
$premetatags = ereg_replace(",+", ",",$keywords);
but I still have duplicates