http://www.php.net/strpos
function valid_phrase ($phrase, $search = 'text to search for') { return strpos($phrase, $search); }
If you really want to use ereg though, you'll need to search for whitespace characters (or maybe just spaces, depending on your need). But I think strpos() will be fine for what you want to do.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php