php validate integer

前端 未结 7 1338
南旧
南旧 2020-11-28 10:43

I`m wonder why this not working

    echo gettype($_GET[\'id\']); //returns string
  if(is_int($_GET[\'id\']))
  {
   echo \'Integer\';
  }

7条回答
提交回复
热议问题