> There's a better way to do this: > > <? > $naughty_words = array( > 'poop', > 'bum', > 'religion' > ); > > echo in_array($text, $naughty_words) ? "found bad words!" : "text is > clean!"; > ?>
This won't work, since you're trying to find the whole of $text in the array $naughty_words. -- Richard Heyes "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein -- 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]