hi, i am trying to write a method that looks for the word 'not' before another word and these words i.e being positive or negative are stored in my database so for example this is not good, the problem im having is getting the word from my DB to be identified
$pos = mysql_query("SELECT word FROM positive");
$neg = mysql_query("SELECT word FROM negative");
$poswords = $pos['word'];
$negwords = $neg['word'];
$find = $review_text;
if (preg_match("/(?<=not) $negwords/i", $find))
{
echo $good++;
}
if (preg_match("/(?<=not) $poswords/i", $find))
{
echo $bad++;
}