How can I add dashes (custom formatting) inside a string of numbers?
<p>I have a site where users enter a numeric code of 10 numbers:</p>

<pre><code>xxxxxxxxxx
</code></pre>

<p>When displaying this value (read from the database), I want it to display in this format:</p>

<pre><code>xxxx-xxxx-xx
</code></pre>

<p>How can I do this with PHP or jQuery?</p>
