Page 1 of 1

Character Validation

Posted: Thu Jun 15, 2006 9:50 pm
by Zorth
Hey,

I checked the PHP manual first of all. I didn't see anything for what I'm looking for, though maybe I'm just blind?

Basically, I need a function that will return either true or false if the character I send it as an argument is a letter, like C++'s isalpha().

Anyone know of such a function? I'd make my own, though I don't think I know how to grab the ASCII value of a character either :(

Thanks.

Posted: Thu Jun 15, 2006 10:01 pm
by feyd
Look at the ctype functions:

http://php.net/ref.ctype

Posted: Thu Jun 15, 2006 10:59 pm
by Zorth
Thank you. This is exactly what I was looking for.