Re: problem with intval and !=
| From: | Robert Sedlacek | Date: | Thu, 23 Oct 2003 16:12:14 +0000 |
| Subject: | Re: problem with intval and != | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167308@lists.php.net to get a copy of this message | ||
On Thu, 23 Oct 2003 11:59:44 -0400, Cesar Cordovez wrote:
> So, how can I check if what ever the user writes is an integer or not,
> knowing that he will write it in a string field.
Idea:
if(($var + 0) == $var AND is_integer($var + 0)) echo "number";
Robert