title: PHP split each paragraph into array
body: <p>I want to <em>split each paragraph</em> into an array.</p>
  
  <p>My current approach doesn't work:</p>
  
  <pre><code>$paragraphs = preg_split( '|&lt;/p&gt;|', $text, PREG_SPLIT_OFFSET_CAPTURE );
  </code></pre>
  
  <hr>
  
  <p>How can I get from this:</p>
  
  <pre><code>$text = &lt;&lt;&lt;TEXT
          &lt;p&gt;Hello!&lt;/p&gt;
          &lt;p style="border: 1px solid black;"&gt;How are you,&lt;br /&gt; today?&lt;/p&gt;
  TEXT;
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>$paragraphs = array(
       '&lt;p&gt;Hello!&lt;/p&gt;',
       '&lt;p style="border: 1px solid black;"&gt;How are you,&lt;br /&gt; today?&lt;/p&gt;'
  );
  </code></pre>