Function to add dashes to US phone number in PHP
<p>What is the best way to add dashes to a phone number in PHP? I have a number in the format <code>xxxxxxxxxx</code> and I want it to be in the format xxx-xxx-xxxx. This only applies to 10 digit US phone numbers.</p>
