note 11894 deleted from function.preg-match by jimw

From: Date: Mon, 17 Dec 2001 23:20:40 +0000
Subject: note 11894 deleted from function.preg-match by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23074@lists.php.net to get a copy of this message
To check for digits: <?php if (!preg_match ("/[0-9]+/", $checkthis)) { echo("contains no digits"); } elseif (preg_match ("/^[0-9]+$/", $checkthis)) { echo("only contains digits"); } else { echo("most likely contains digits and letters"); } ?> ________ phool

« previous php.notes (#23074) next »