Re: PHP Phone Number Validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



IMEX Research wrote:
OK, I know this has probably gone aruond the list a few times, but how do I validate a phone number that is in the format ddd-ddd-dddd ?? I can't figure out how.

preg_match ( "/^\d{3}-\d{3}-\d{4}$/", $phnumber )

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux