Format string to date
<p>I am having difficulty formatting a string to a human-readable date format.</p>

<p>I have: </p>

<blockquote>
  <p>07122012</p>
</blockquote>

<p>and need to get </p>

<blockquote>
  <p>7 Dec 2012</p>
</blockquote>

<p>Tried: </p>

<pre><code>date("j M Y", strtotime($str));
</code></pre>
