note 10136 deleted from function.intval by kennyt
| From: | kennyt@php.net | Date: | Wed, 04 Feb 2004 02:21:51 +0000 |
| Subject: | note 10136 deleted from function.intval by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64621@lists.php.net to get a copy of this message | ||
Note Submitter: supad@supaddiffusion.com
----
[Editor's Note: Or just use is_numeric() or ctype_digit()]
intval() is usefull to see if a var is a number or a letter.
$test1 = "11";
$test2 = "RT";
intval($test1) returns 11
intval($test2) returns 0
So, except if your number is 0, a 0 will mean it's a letter...