note 69199 rejected from function.is-numeric by bjori
| From: | bjori@php.net | Date: | Sat, 26 Aug 2006 19:54:05 +0000 |
| Subject: | note 69199 rejected from function.is-numeric by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116373@lists.php.net to get a copy of this message | ||
Note Submitter: jfuture at gmail dot com
----
WARNING: This function returns TRUE if fed an empty string variable:
$sValue = "";
if (ctype_digit ($sValue))
echo ("It's a number!");
else
echo ("It's not a number!");
This script outputs "It's a Number" when a blank string should not be considered
numeric.