I`m wonder why this not working
echo gettype($_GET[\'id\']); //returns string
if(is_int($_GET[\'id\']))
{
echo \'Integer\';
}
It sounds like you are checking if a string contains an integer, rather than if that variable is an integer. If so, you should check out php's regex (regular expression) functionality. It allows you to check for very specific patterns in a string to validate it for whatever criteria. (such as if it contains only number characters)
Here's the php page http://php.net/manual/en/function.preg-match.php
and here's a cheat sheet on regular expressions (to make the $pattern string) http://regexpr.com/cheatsheet/