> <snip> > > Sorry, I don´t know that you needed an effective snipet. And you are > > right, > > I only writed for positive integers. Try something like apply 2 type cast > > simunltaneous. > > > > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"]) > > echo "is int"; > > > > > Why not just use the is_int() function? > > www.php.net/is_int
Please try to use is_int() on a value passed from a form and see why. Also, in the beginning of this thread, the OP already said that is_int() had been tried. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php