How to split an HTML string into chunks in PHP?
<p>I would like to split a string efficiently into different sub strings  like this :</p>

<pre><code>  &lt;li&gt;&lt;a href=""&gt;One&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href&gt;Two&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href&gt;Three&lt;/a&gt;&lt;/li&gt;.....&lt;li&gt;&lt;a herf&gt;Last&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I would like to split this string in 3 parts and put each string in a variable.</p>

<p>The first variable $first should contain the first li (<code>&lt;li&gt;One&lt;/li&gt;</code>)
The second variable $second should contain the rest expect the last (<code>&lt;li&gt;Two&lt;/li&gt;&lt;li&gt;Three&lt;/li&gt;.....</code>)
The third variable $third should contain the last li (<code>&lt;li&gt;Last&lt;/li&gt;</code>)</p>

<p>Anyone can help ?</p>