Re: An integer?

From: Date: Mon, 21 Aug 2000 06:33:43 +0000
Subject: Re: An integer?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12720@lists.php.net to get a copy of this message
> > you could try this: > > > > $int_var = (int)$your_form_variable; > > > > $int_var now has no choice but to be an integer. > > But this is exactly my problem, I can force it to be an integer, but I > need to see if that force is invalid instead of just ending up with 0 like > I do. I do this all the time. Make absolutely sure that the variable only has numbers in it..(that is most important). Even run a trim() on it first to make sure it only has numbers before turning it into an integer. This just seems fishy that it is not working. I may be preaching to the choir here... so forgive me if you tried this already. :) -jeremy brand _______________________________________________________________________ GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9 _ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more __

« previous php.general (#12720) next »