note 10774 deleted from function.is-integer by zak
| From: | zak@php.net | Date: | Tue, 11 Sep 2001 16:38:36 +0000 |
| Subject: | note 10774 deleted from function.is-integer by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17911@lists.php.net to get a copy of this message | ||
A good trick was pointed out for is_int() that works great with form data is using: $variable+=0;
If $variable was non-numeric, it will be set to an integer 0. If it was numeric in the first place,
the data will be unchanged.
example:
if (($f_Num += 0) == 0) { ... }