Results 1 to 14 of 14
Sep 14, 2012, 08:44 #1
- Join Date
- Apr 2005
- 3 Post(s)
- 0 Thread(s)
php function is_integer_or_string_integer ?
It makes me feel like a right noob asking this, but is there any built-in php function that will tell you whether a variable represents an integer, or a string integer eg 2 or "2" but not 2.4 or "2.4".
is_int() will be false if it is a string.
is_numeric will allow decimal places and +- signs.
I usually just use my own function, but am I missing something built in?