title: How to convert list data to table in php
body: <p>I'm creating a hockey website using wordpress. I have a custom menu of Hockey players and im using wp_nav_menu to get html like this:</p>
  
  <pre><code>&lt;ul id="example-menu"&gt;
  &lt;li&gt;&lt;a href="/example/"&gt;[3] [DeBlois] [USA] [20 yr] [5’11] [185 lbs]&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/example/"&gt;[35] [Baldino] [USA] [20 yr] [5’11] [185 lbs]&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/example/"&gt;[2] [Esch] [USA] [20 yr] [5’11] [185 lbs]&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>before echoing this onto the page, I want to break it into an array and put it back together in a table so each column is lined up nicely. I also need to replace the [USA] part with a graphic, which will be easy to do once I get the list into the array.</p>
  
  <p>What's the best way to parse through this type of html? Is there a different function I can use in WP?</p>