From: André Medeiros [mailto:[EMAIL PROTECTED] 

> On Wed, 2005-07-27 at 11:41 -0400, Mike Johnson wrote:
> > From: André Medeiros [mailto:[EMAIL PROTECTED] 
> > 
> > > On Wed, 2005-07-27 at 16:16 +0100, Mark Rees wrote:
> > > 
> > > > Or even four - like Rafael van der Vaart for example - so 
> > > make sure that the
> > > > surname box matches spaces as well, and special characters 
> > > like the ê, as
> > > > well as ' as in John O'Kane
> > > > 
> > > 
> > > Yeah, that's why strpos will make his life much easier :)
> > 
> > Can you explain how you'd use strpos() in this situation? I 
> was going to ask earlier, but didn't bother, but now I'm curious...
> > 
> 
> That's not very nice of you, saying that to people who try to help ;)

Well, it could be argued that an obtuse link to the online docs and nothing 
else isn't "trying to help."   ;)

> if( strpos( $_POST['frmName'], ' ' ) === false ) {
>     // Do error handling here
> } else {
>     // All is OK :)
> }

Gotcha. Except that it'll accept a ' ' string as valid.   :P

-- 
Mike Johnson             Smarter Living, Inc.
Web Developer            www.smartertravel.com
[EMAIL PROTECTED]   (617) 886-5539

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to