PHP scan HTML for image tags and put in table
<p>I'm not sure the best way to get a block of HTML containing img tags and text and be able to put these into separate table cells.</p>

<p>E.g</p>

<pre><code>&lt;img src="image.jpg&gt; text
&lt;img src="image2.jpg&gt; text2
</code></pre>

<p>To </p>

<pre><code>&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="image.jpg&gt;&lt;/td&gt; &lt;td&gt;text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="image2.jpg&gt;&lt;/td&gt; &lt;td&gt;text2&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p></p>

<p>I think using preg_split is the right way but don't know where to start with the expression.
Also I would need somehow retain the chunk that the string is being split by.</p>
