I'm having trouble checking if the value of $_GET
is integer. Here is the code:
<?php
$modo=$_GET['PG'];
if(is_int($modo)){
echo "e inteiro";
}else{
echo "n e inteiro";
}
?>
Even though I put a number in $_GET
, it always returns that it is not a int
.