Integers from Query String
Posted on 2006-10-29
Hi! I'm wondering if there's any way to check if a variable passed by a query string is an integer ...
5 is an integer, but not to php:
is_int($var) === false
I know how to require an integer, but if it's optional to pass either a string or an integer, how can I check the data type?
I don't think " is_numeric() " would work because a numeric string is not the same as an integer ...