ereg-digits only...

From: Date: Tue, 12 Feb 2002 11:04:00 +0000
Subject: ereg-digits only...
Groups: php.db php.general 
Request: Send a blank email to php-db+get-16854@lists.php.net to get a copy of this message
How do I check a string for it to only contain numbers? >> if(!ereg("([0-9]+)",$string)){ print "It contains characters other than numbers"; }else{ print "Only numbers"; } << Can anyone give some feedback... regards, Bart

« previous php.db (#16854) next »