Return to Snippet

Revision: 1163
at September 20, 2006 10:20 by fbnewtz


Initial Code
function format_phnum($ac,$ph) {
	$areaCode = '(' . $ac . ') ';
	$npa = substr($ph,0,3) . '-';
	$num = substr($ph,3,4);
	return $areaCode . $npa . $num;
}

Initial URL


Initial Description
Use this to format a phone number for display on a page.

Initial Title
Format a phone number in PHP

Initial Tags
php, format

Initial Language
PHP