Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- isNumber function?
May 29, 2005, 12:01 am
rate this thread
Hello, I'm using PHP 4 and I was wondering if there was a function, or
an easy way to check if a variable is a number. THe "intval" function
doesn't work very well for me because if the variable is "abc" or "0",
the same value is returned. I would prefer a function that tells me
"abc" is not a number and "0" is a number.
Thanks, - Dave