hullo.
i am currently stumped by a seemingly simple problem.
i have a script that searches through my site's mysql database and returns results to the end user. the fields on each row are mainly page content and meta-tag data.
i want my script to eregi() the field that holds the robots metatag for a value of "NOINDEX". almost all rows have either "NOINDEX,NOFOLLOW" or "INDEX,FOLLOW" as values for this field.
now for the buggy part. in the loop that is supposed to actually display the results, all of the fields can be displayed via $row[] except the robots field, which displays nothing
huh?!?!?
below is the tiny loop that's supposed to do this:
<?
while ($row = mysql_fetch_array($result)){
echo "buttpain = $row[4] <br>";
echo "table = $row[0]";
if(!eregi("noindex",$row[4])){
printf("<p><a href=\"../../web/$row[0]/$row[1].html\">$row[2]</a><br>
$row[3]<br>
<font color='#57A275'>www.website.org/web/$row[0]/$row[1].html</font></p>
");
}
}
?>
in the code above, everything works fine except those lines involving $row[4]...i have tried mysql_fetch_row, mysql_fetch_assoc, and mysql_fetch_array, all with the same result.
with the way this works right now, my eregi() isn't working, and all pages with a "NOINDEX" value are still being displayed.
this is strange. i don't understand why it's happening. any suggestions?
--dolphinsnot