note 40551 deleted from function.is-int by nlopess

From: Date: Sun, 07 Mar 2004 19:18:31 +0000
Subject: note 40551 deleted from function.is-int by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66402@lists.php.net to get a copy of this message
Note Submitter: ---- You can also use is_int() for form input if you want to check wether the variable is an integer or not. Just do like this: <? if (is_int($form_input+0) { echo "This is an integer"; } else { echo "This is not an integer."; } ?> The "+0" converts the string to an integer, so is_int() can be used.

« previous php.notes (#66402) next »