you could also use this:

function is_alphanum($data) {
  return preg_match('/^\w+$/', $data);
}

> -----Original Message-----
> From: Steve Werby [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 06, 2001 3:32 PM
> To: John Monfort; [EMAIL PROTECTED]
> Subject: Re: [PHP] is_alpha_numeric ?
> 
> 
> "John Monfort" <[EMAIL PROTECTED]> wrote:
> >  I'm trying to determine if an argument is alphanumeric. Is there a
> > function to do this?
> 
> There may be in the CVS version (would have to check), but there's not in
> 4.0.6.  eregi( [[:alnum:]]{1,}, $string ) may do the trick.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
> 
> 
> -- 
> 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 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