note 25864 deleted from function.is-numeric by irchtml
| From: | irchtml@php.net | Date: | Sun, 08 Feb 2004 11:42:49 +0000 |
| Subject: | note 25864 deleted from function.is-numeric by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64821@lists.php.net to get a copy of this message | ||
Note Submitter: oliver.ahlberg@smp.se
----
This small functions should do the trick, but doesn't handle exponentials. (You should be able
to figure out the exp part easily.)
function str_is_numeric($var) {
if ($var+1 != 1 || $var == "0") {
return true;
} else {
return false;
}
}