MySQL query for content UP TO a certain string and AFTER same string
<p>In a query result, I want to store everything leading UP TO a certain string, the <code>&lt;/a&gt;</code> in <code>&lt;a href="imgpath" imgsrc="imgpath"&gt;&lt;/a&gt;</code> and then everything AFTER the <code>&lt;/a&gt;</code> to a second variable.</p>

<p>[edit] a rephrasing of the question:</p>

<p>the value in $row[post_content] would be something like <code>"&lt;ahref=''&gt;&lt;image&gt;&lt;/a&gt;&lt;p&gt;copy&lt;/p&gt;" ...</code></p>

<p>i need to split this into <code>$val1 = "&lt;ahref=''&gt;&lt;image&gt;&lt;/a&gt;"; and $val2 = "&lt;p&gt;copy&lt;/p&gt;";</code></p>

<p>This is probably done with <code>substr()</code>? but i have no idea how, and I HAVE searched, and found nothing but references to bad character sets in mysql because of my use of the term 'character' in my search.</p>
