FILTER_VALIDATE_INT

Check whether the value is Integer or not
Example
======

<?php
$var=200;
$int_options = array(“options”=>array(“min_val”=>10, “max_val”=>356));
var_dump(filter_var($var, FILTER_VALIDATE_INT, $int_options));
?>

Output
=====

int(200)

Share

Leave a Reply

Your email address will not be published. Required fields are marked *