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 } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP] Profanity Filter Website4S
- Re: [PHP] Profanity Filter Ignacio Vazquez-Abrams
- Re: [PHP] Profanity Filter Stephan Ahonen
- Re: [PHP] Profanity Filter Nik Gare
- Re: [PHP] Profanity Filter Fraser MacKenzie
- Re: [PHP] Profanity Filter Website4S
- Re: [PHP] Profanity Filter Ignacio Vazquez-Abrams
- Re: [PHP] Profanity Filter Sterling Hughes
- Re: [PHP] Profanity Filter Ignacio Vazquez-Abrams
- Re: [PHP] Profanity Filter Sterling Hughes
- Re: [PHP] Profanity Filte... Ignacio Vazquez-Abrams
- Re: [PHP] Profanity F... Ignacio Vazquez-Abrams
- Re: [PHP] Profanity F... Sterling Hughes