title: How to split string at <div></div>
body: <p>I have stored some strings in mysql table, in this form (in a Single column) -</p>
  
  <pre><code>&lt;div id='ques'&gt;Question 1 is written here&lt;/div&gt;
  &lt;div id='opt1'&gt;Text of option 1&lt;/div&gt;
  &lt;div id='opt2'&gt;Text of option 2&lt;/div&gt;
  &lt;div id='opt3'&gt;Text of option 3&lt;/div&gt;
  &lt;div id='opt4'&gt;Text of option 4&lt;/div&gt;
  &lt;div id='opt5'&gt;Text of option 5&lt;/div&gt;
  &lt;div id='opt6'&gt;Text of option 6&lt;/div&gt;
  </code></pre>
  
  <p>For some reasons I can't use separate columns (to store) for these divs', <strong>All the demo code written above is in a Single column (or Cell to be correct) of table.</strong> So, the divs themselves are a part of single huge string. Therefore string would be like, </p>
  
  <pre><code>$question_set="&lt;div id='ques'&gt;Question 1 is written here&lt;/div&gt;&lt;div id='opt1'&gt;Text of option 1&lt;/div&gt;&lt;div id='opt2'&gt;Text of option 2&lt;/div&gt;&lt;div id='opt3'&gt;Text of option 3&lt;/div&gt;&lt;div id='opt4'&gt;Text of option 4&lt;/div&gt;&lt;div id='opt5'&gt;Text of option 5&lt;/div&gt;&lt;div id='opt6'&gt;Text of option 6&lt;/div&gt;"
  </code></pre>
  
  <p><strong>What I want is to split text at each div, and store its innerHtml value in its counter php variable</strong>, i.e. like,</p>
  
  <pre><code>$question="Question 1 is written here";
  $option1="Text of option 1";
  </code></pre>
  
  <p>and so on...</p>
  
  <p><strong>Edit - 1</strong>
  Some of you wanted, if I have done research, here is what i could do my best -</p>
  
  <pre><code>list($question, $option1, $option2, $option3, $option4, $option5, $option6) = split('&lt;/div&gt;', $question_set);
  echo $question;
  echo "&lt;br&gt;";
  echo $option1;
  </code></pre>
  
  <p>also, similar result was achieved by -</p>
  
  <pre><code>list($question, $option1, $option2, $option3, $option4, $option5, $option6) = explode('&lt;/div&gt;', $question_set);
  </code></pre>
  
  <p>and so on..</p>
  
  <p><strong>Note</strong> - i didn't post it earlier for many reasons, biggest of which is if you go by my name/profile I am a <strong>doctor of human beings</strong>, Not even a student of programming. I dint want to deviate my discussion earlier as Not only above mentioned method is working for me to an extent giving me some other problems, but also my wamp server says "Deprecated: Function split() is deprecated"
  anyways
  Thanks. Regards,</p>