Re: Profanity Filter
| From: | Nik Gare | Date: | Sat, 20 Jan 2001 13:06:38 +0000 |
| Subject: | Re: Profanity Filter | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35797@lists.php.net to get a copy of this message | ||
In article <94adfp$5le$1@toye.p.sourceforge.net>,
Stephan Ahonen <analogy@wheezebucket.com> wrote:
> I'd make it an array:
> $filter = array(moron, idiot, pratt);
> foreach($filter as $badword) {
> if (strstr($name, $badword)) {
> do this if it contains one of the bad words
> }
> else {
> do this if it doesn't
> }
> }
But wouldn't this approach have its drawbacks, too?
For example, I live in Kiel, Germany, about 20km from a town called
Wankendorf. Presumably I wouldnÄt be able to say this.
Nik