title: format a string separate with dots
body: <p>Is there another alternative (smaller) for to format a string separate with dots?  Like this:</p>
  
  <p>Unformatted:
  9211fe01c98c8847c1a397a6c9c95986</p>
  
  <p>Formatted
  9211.fe01.c98c.8847.c1a3.97a6.c9c9.5986</p>
  
  <p>I'm using the substr function, like this sample:</p>
  
  <pre><code>$part1 = substr($codigo, 0, 4); 
  $part2 = substr($codigo, 4, 4); 
  $part3 = substr($codigo, 8, 4); 
  $part4 = substr($codigo, 12, 4); 
  $part5 = substr($codigo, 16, 4);
  $part6 = substr($codigo, 20, 4);
  $part7 = substr($codigo, 24, 4);
  $part8 = substr($codigo, 28, 4);
  echo "$part1.$part2.$part3.$part4.$part5.$part6.$part7.$part8"; 
  </code></pre>
  
  <p>The string have 32 chars.</p>