I`m wonder why this not working
echo gettype($_GET[\'id\']); //returns string if(is_int($_GET[\'id\'])) { echo \'Integer\'; }
To validate form data (string) as an integer, you should use ctype_digit() It returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. (PHP 4 >= 4.0.4, PHP 5)
ctype_digit()
TRUE
FALSE
Reference: http://php.net/manual/en/function.ctype-digit.php