Split a title in half, or get as close to the middle as posible
<p>So I have this H3 title and I want to take half of it and wrap it in a span.
The problem is the title can have 4 words, or 2 or 5 and so on, and I just can figure out how to split the title in half (more or less).</p>

<p>So I want to go from:</p>

<pre><code>&lt;h3&gt;Some random title goes here&lt;/h3&gt;
</code></pre>

<p>to this:</p>

<pre><code>&lt;h3&gt;Some random &lt;span class="green"&gt;title goes here&lt;/span&gt;&lt;/h3&gt;
</code></pre>

<p>PHP or JavaScript, anything goes.</p>
