is this correct? regular expressions

From: Date: Tue, 25 Mar 2003 22:22:40 +0000
Subject: is this correct? regular expressions
Groups: php.general 
Request: Send a blank email to php-general+get-141023@lists.php.net to get a copy of this message
just trying to say if $phone isn't all numbers set it to all zeros.. so is that right? cause i can't seem to get it to work. if (!ereg("^[0-9]$",$phone)) { $phone = "0000000000"; } thanks!

« previous php.general (#141023) next »