Reduce First Word in String to 3 Characters in PHP
<p>I have a set of date strings in the following format:</p>

<pre><code>$date = 'month_name DD, YYYY';
</code></pre>

<p>What I would like to do is shorten the month name to 3 characters and remove the year from the end like this:</p>

<pre><code>$output = 'June 10, 2012';
print $output // Outputs 'Jun 10';
</code></pre>

<p>So far I have the following, but have not been able to find a method to shorten the first word:</p>

<pre><code>print substr($date, 0, strrpos($date, ',')); // Outputs 'June 10';
</code></pre>

<p>Any help would be appreciated!</p>
