Re: check for variable value but need 0 to be good ?
| From: | Jon Parise | Date: | Tue, 01 Aug 2000 19:00:25 +0000 |
| Subject: | Re: check for variable value but need 0 to be good ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9517@lists.php.net to get a copy of this message | ||
On Tue, Aug 01, 2000 at 02:59:21PM -0400, Jon Parise wrote:
> Try checking the length of the string:
>
> if ((strlen(trim($my_var)) > 1) && is_int($my_var)) {
Woops, that should be > 0.
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member