That part is easy(split each one into an array variable using explode on
spaces).
The problem is getting a relevancy rating for each keyword and only putting
it into the database once.
Has anyone done this or have any ideas?
I will think i would do something like this...
<?php
$Words = explode(" ", $yourtext);
$IgnoreWords = array("the", "and", "is", "are", "then"); //...
$WordsCount = array_count_values($Words);
$WordsCountKeys = array_keys($WordsCount);
foreach($WordsCountKeys as $x) {
if(!in_array($x, $IgnoreWords)) {
if($WordsCount[$x] >= 2) { //word in text 2 times or more
//add to keywords
}
}
}
?>
Maybe this can help you the first way?
Maybe there is some errors... im hungry... so I will go out eating :)
Regards,
Johan