On Fri, 19 Jan 2001, Sterling Hughes wrote:

> 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
>

That method suffers from the dictionary problem that Egan brought up.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>



-- 
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]

Reply via email to