PHP is great. It complements JavaScript wonderfully. You may have already formatted the phone number on the front end, but what about on the backend? There comes a time when you need to use php to format a phone number. I use this function in my projects all the time.

PHP Format Phone Number Function

PHP function format_phone($country, $phone) { $function = ‘format_phone_’ . $country; if(function_exists($function)) { return $function($phone); } return $phone; } function format_phone_us($phone) { // note: making sure we have something if(!isset($phone{3})) { return ”; } // note: strip out everything but numbers $phone = preg_replace(“/[^0-9]/”, “”,

Find the Best SEO in Fort Lauderdale, Florida (Plantation SEO) | Drupal & Worpress Develpment