You are here: parsing phone numbers « PHP Programming Language « IT news, forums, messages
parsing phone numbers

Posted by laredotornado@zipmail.com on 05/07/07 19:56

Hi,

Using php 4.4.4, I am looking to parse a US phone number string into 3
smaller strings -- area code, the first part of the phone number (3
digits) and the last part of the phone number (4 digits). The only
given is that there will be 10 digits in the string, but people may
include spaces, parens, or other characters. These are all strings
I'd expect

$p = "5558675309";
$p = "(312) 123-4567";
$p = "512-234-5678";

Thanks for any code snippets, - Dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация