Re: Profanity Filter

From: Date: Fri, 19 Jan 2001 22:03:57 +0000
Subject: Re: Profanity Filter
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35736@lists.php.net to get a copy of this message
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 } }

« previous php.general (#35736) next »