Ereg/replace/i/ or something ??

From: Date: Wed, 30 Jan 2002 14:08:58 +0000
Subject: Ereg/replace/i/ or something ??
Groups: php.general 
Request: Send a blank email to php-general+get-82735@lists.php.net to get a copy of this message
Hello, I want to check the data from a form-field if it excists only of digits (0-9) and nothing else. How do I use the ereg()-function for this? >> ereg("[0-9]",$cust_tel, $cust_tel); << It is also to turn it around but then the pattern will get larger because it has to contain: / "'.,-)(*&^%# a-z A-Z and so on... The field has to be 10 digits long and has to contain only digits!!! Can anyone help me? Regards, Bart

« previous php.general (#82735) next »