title: insert comma into string in php
body: <p>how do i insert a comma in string like </p>
  
  <pre><code>$str = "0470   06102009                                2981485GIR ADE TAUHID";
  </code></pre>
  
  <p>every length i put in array like </p>
  
  <pre><code>$legth = array(7,8,15,50);
  </code></pre>
  
  <p>i just wanna make the result like</p>
  
  <pre><code>0470  ,06102009 ,2981485GIR     ,ADE TAUHID
  </code></pre>
  
  <p>where every string splited according to length on the array, including whitespace, </p>
  
  <pre><code>length(7),length(8),length(15),length(50)
  </code></pre>
  
  <p>how i do that ?</p>