<?php
$myvar=102;

$my_options = array(
"options"=>array
  (
  "min_range"=>0,
  "max_range"=>101
  )
);

if(!filter_var($myvar, FILTER_VALIDATE_INT, $my_options))
  {
  echo("Provided variable is not an integer");
  }
else
  {
  echo("Provided variable is an integer");
  }
?> 