title: Turn Paragraphs into Unordered List
body: <p>I'm working with Wordpress and I am trying to turn all the paragraphs into an ordered list and it's working almost perfectly.
  My code:</p>
  
  <pre><code>$list_items1 = explode("&lt;p&gt;", $bulletlist);
      echo '&lt;ul&gt;';
          foreach($list_items1 as $list_item)
          echo '&lt;li&gt;' . $list_item . '&lt;/li&gt;';
      echo '&lt;/ul&gt;';
  </code></pre>
  
  <p>The only problem is, that it creates an empty list item at the beginning of each list, like this:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;List item 1&lt;/li&gt;
      &lt;li&gt;List item 2&lt;/li&gt;
      &lt;li&gt;List item 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How can this be fixed? Is there any other solution to fix that? Thanks in advance!
  PS: It should also work as an ordered list.</p>