I need help combing the following 2. I cannot figure out how to do a query and then check if for a certain value.
$qryReplies = mysql_query("SELECT author FROM replies WHERE thread='$id'");
while($r = mysql_fetch_array($qryReplies)) {
$author=$r['author'];
}
$checkFor="fassbender";
$arr = array($author);
if (in_array($checkFor, $arr)) {
print "$needle is in the array!\n";
} else {
print "$needle is not in the array\n";
}
I can get it to work when I use
$arr = array('harris', 'harris', 'fassbender');
But not
$arr = array($author);