note 18168 deleted from function.intval by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 10:08:31 +0000 |
| Subject: | note 18168 deleted from function.intval by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48489@lists.php.net to get a copy of this message | ||
Note Submitter: some@gamepoint.net
----
[Editors note: Or simply use is_numeric() or ctype_digit() as forms pass stringed numbers, not
integers]
If you wish to is_int() so called values from a form or in general this would mean numbers in
strings, you can just do the following
[code]
$nr = "203";
if(is_int($nr+0))
echo "is integer";
else
echo "is not integer";
[/code]
The $nr+0 will convert the string to a real numerical value in order to add 0 to it.