PHP split string containing html tags and split string into array
<ol>
<li><p>Question </p>

<p>i have string like this <strong><em>$str="a|apple||b|bat||c|cat||d|dog";</em></strong></p>

<p>from the above string i want to create a array dynamically n that newly created array     shud look like this   <strong><em>Array
                 (
                   [a] => apple
                   [b] => bat
                   [c] => cat
                   [d] => dog
                 )</em></strong></p></li>
<li><p>Question</p>

<p>i have html string like this</p>

<pre><code>            $html_string="&lt;div&gt;Content Div1&lt;/div&gt;
                          &lt;div&gt;Content Div2&lt;/div&gt;
                          &lt;div&gt;Content Div3&lt;/div&gt;";
</code></pre></li>
</ol>

<p>how can i get 3rd DIV ,resulting answer should be like this </p>

<pre><code>              $ans="&lt;div&gt;Content Div3&lt;/div&gt;" ;
</code></pre>

<p>Please anyone help me   </p>
