note 15208 added to function.is-numeric
| From: | mark at peak-comm dot com | Date: | Fri, 31 Aug 2001 19:39:19 +0000 |
| Subject: | note 15208 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17455@lists.php.net to get a copy of this message | ||
This works for PHP3
function is_numeric($n) {
if (ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $n)) {
return(1);
} else {
return(0);
}
}
http://www.php.net/manual/en/function.is-numeric.php