> On Fri, 19 Jan 2001, Sterling Hughes wrote: > > > If you go with the other method (described by Ignacio), see the in_array() > > function, which saves you the trouble of looping... > > > > -Sterling > > > > I thought about in_array(), but then I realized that the comparison has to go > the OTHER way :) > I'm saying use the same method, but use an array and avoid the strpos() function: $words = preg_split("//", $data); foreach ($words as $word) { if (in_array($prof, $words)) { echo "BAD WORD"; echo "BAD WORD"; echo "I'M TELLING"; } } -Sterling -- 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
- Re: [PHP] Profanity F... Ignacio Vazquez-Abrams
- Re: [PHP] Profanity F... Sterling Hughes
- Re: [PHP] Profanity F... Sterling Hughes
- Re: [PHP] Profanity F... Ignacio Vazquez-Abrams
- Re: [PHP] Profanity F... Alex Black
- [PHP] CF vs PHP for C... DPG Account
- Re: [PHP] CF vs PHP f... Michael Kimsal