NetworkTown.Net
Account Closed
- Impact
- 2


<?
$title = substr_count($row['title'], 'football');
if($title <= 0) {
//Show the stuff
echo "Heres Your Non-Football Results!";
} else {
//Don't Show The Stuff
echo "Heres Your Crappy Football...";
}
?>
$title = substr_count($row['title'], 'football, ball, phone');
<?
$checkfor = array("football", "ball", "phone");
$keepcount = 0;
foreach($checkfor as $value) {
$title = substr_count(strtoupper($row['title']), strtoupper($value));
$keepcount = $title+$keepcount;
}
if($keepcount <= 0) {
//Show the stuff
echo "Heres Your Non-Football or ball or phone Results!";
} else {
//Don't Show The Stuff
echo "Heres Your Crappy Football or ball or phone...";
}
?>
Dan said:You could try: (untested)PHP:<?php $words = 'football|baseball|soccer'; // words separated by | if (eregi('('.$words.')', $row['title'])) { // the title contains something in $words } else { // the title doesn't have something in $words } ?>



