i have 2 methods to check if words appear within a piece of text, the method only checks for a word once but i want it to check more than once
while ($pos_words = mysql_fetch_assoc($pos)) {
if (strpos($review_text, $pos_words['word']) !== FALSE) {
$good++;
}
}
//Get negative words and check it against the review, minus 1 if word found
while ($neg_words = mysql_fetch_assoc($neg)) {
if (strpos($review_text, $neg_words['word']) !== FALSE) {
$bad++;
}
}
anyone know how this can be done ? anyhelp would be appreciated