note 14786 deleted from ref.ctype by jimw

From: Date: Fri, 14 Dec 2001 21:16:24 +0000
Subject: note 14786 deleted from ref.ctype by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22821@lists.php.net to get a copy of this message
Its not a perfect solution, but if you're can't or don't want to use the ctype functions, you can test to see if something is an integer by doing something like this:<br> <br> if ( $var != "0" && $var / 1 == 0 ) { }<br> <br> it seems redundant, but you're checking to be sure that $var is not the string representation of 0 first, and then finding out if $var is divisible by itself.

« previous php.notes (#22821) next »