note 15373 added to function.is-int
| From: | ajimenez at iie dot ufro dot cl | Date: | Fri, 07 Sep 2001 00:49:07 +0000 |
| Subject: | note 15373 added to function.is-int | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17750@lists.php.net to get a copy of this message | ||
All the query strings are strings, is better to use regexp to identify when values are numbers:
<?php
if (!ereg("^([0-9])*([0-9])$",$id)) {
echo "no number";
}
else
{
echo "number";
}
?>
http://www.php.net/manual/en/function.is-int.php