Re: problem with intval and !=
| From: | Marek Kilimajer | Date: | Thu, 23 Oct 2003 16:43:26 +0000 |
| Subject: | Re: problem with intval and != | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167314@lists.php.net to get a copy of this message | ||
These are all workarounds around the real problem. If php gets it wrong fix php.
Robert Sedlacek wrote:
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