Php simple phone format

$phone = 3334449999;
$phone = preg_replace(“/([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/”, “($1) $2-$3”, $phone);

Comments are closed.