Posted by usenet on 02/11/06 22:46
On Thu, 9 Feb 2006 14:02:04 -0800, "Jim Michaels" <jmichae3@nospam.yahoo.com>
wrote:
>"Colin McKinnon"
><colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> wrote in
>message news:74NAf.62520$Dg6.12645@newsfe3-gui.ntli.net...
>> Fernando Rodredguez wrote:
>>
>>> How can I know if a string only has alfanumeric chars?
>>>
>>
>> Use a regex.
>>
>> C.
>
>give him an example!
>
>preg_match('/^[\w\d]$/', $string);
>
Or use the built-in function.
www.php.net/ctype_alpha
[Back to original message]
|