note 75142 deleted from function.ctype-digit by philip

From: Date: Sun, 22 Feb 2009 21:13:50 +0000
Subject: note 75142 deleted from function.ctype-digit by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150965@lists.php.net to get a copy of this message
Note Submitter: ---- You have your if() statement backwards. It's returning "This does not consist of only digits." when cytype_digit($var) is true. <?php $var = 5; if (cytype_digit($var)) { echo "This does not consist of only digits."; } else { echo "This cosists of only digits."; } ?>

« previous php.notes (#150965) next »