advanced code snippet search
fbnewtz on 09/20/06
php format phone-number
09/20/06 10:20am
2 people have marked this snippet as a favorite
vali29willcodeforfood
Use this to format a phone number for display on a page.
function format_phnum($ac,$ph) { $areaCode = '(' . $ac . ') '; $npa = substr($ph,0,3) . '-'; $num = substr($ph,3,4); return $areaCode . $npa . $num;}
Report this snippet Tweet
Comment:
You need to login to post a comment.