Format a phone number in PHP
Use this to format a phone number for display on a page.
Copy this code and paste it in your HTML
function format_phnum($ac,$ph) {
$areaCode = '(' . $ac . ') ';
return $areaCode . $npa . $num;
}
Report this snippet
Comments
Subscribe to comments