php3-list | 200003
Date: 03/31/00
- Next message: Gudmundur Helgason: "[PHP3] Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (111)"
- Previous message: Marc: "[PHP3] PHP - sound great but how..."
- In reply to: Nicholas Burke: "[PHP3] swear word checker"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thanks for everyones quick response..
i ended up going with:
<?
$Data="this is a decent checker goes through everything pretty quickly, but its killing my fuckin head my hurts.";
echo $Data."<br>";
$q=new db;
$q->query("SELECT word FROM swear");
while ($q->next_record()) {
$word[]=$q->f("word");
}
$swear=0;
for ($i=0; $i<count($word); $i++) {
if (eregi($word[$i], $Data, $regs)) {
$swear=1;
$word_total[]=$regs[0];
}
}
if ($swear) {
for ($i=0; $i<count($word_total); $i++) {
echo "$word_total[$i]<br>";
}
} else {
echo "its all good";
}
?>
needed to track and specify the words.
thanks again..
Nick Burke
"Gentlemen, you can't fight in here... this is the war room."
Dr. Strangelove
- Next message: Gudmundur Helgason: "[PHP3] Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (111)"
- Previous message: Marc: "[PHP3] PHP - sound great but how..."
- In reply to: Nicholas Burke: "[PHP3] swear word checker"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

