Add space after every 4th character
<p>I want to add a space to some output after every 4th character until the end of the string.
I tried:</p>

<pre><code>$str = $rows['value'];
&lt;? echo substr($str, 0, 4) . ' ' . substr($str, 4); ?&gt;
</code></pre>

<p>Which just got me the space after the first 4 characters.</p>

<p>How can I make it show after every 4th ?</p>

<p>Thanks</p>
