title: create ul and li using a multidimensional array in php
body: <p>I have the following array:</p>
  
  <p>$tree_array</p>
  
  <p>When I do a var_dump, I get:</p>
  
  <pre><code>array(6) {
      [0]=&gt; string(23) "$100,000 Cash Flow 2013"
      [1]=&gt; array(6) {
          [0]=&gt; string(1) "2" ["Goal_ID"]=&gt; string(1) "2"
          [1]=&gt; string(13) "Sell Iron Oak" ["Opportunity"]=&gt; string(13) "Sell Iron Oak"
          [2]=&gt; string(2) "10" ["OID"]=&gt; string(2) "10"
      }
      [2]=&gt; array(2) {
          [0]=&gt; string(32) "ask her if she would like to buy" ["Activity"]=&gt; string(32) "ask her if she would like to buy"
      }
      [3]=&gt; array(6) {
          [0]=&gt; string(1) "2" ["Goal_ID"]=&gt; string(1) "2"
          [1]=&gt; string(8) "Sell Car" ["Opportunity"]=&gt; string(8) "Sell Car"
          [2]=&gt; string(2) "11" ["OID"]=&gt; string(2) "11"
      }
      [4]=&gt; array(2) {
              [0]=&gt; string(52) "Call Roy back to see if he would like to purchase it" ["Activity"]=&gt; string(52) "Call Roy back to see if he would like to purchase it"
      }
      [5]=&gt; array(1) {
          ["tot_opp"]=&gt; NULL
      }
  } 
  </code></pre>
  
  <p>My end goal is to create unordered lists and lists (ul, li) with this data.  There will be more data added to the array as the database gets updated, so it will keep growing.  My goal is to loop through the array and have it create the following code and be able to keep creating lists as the data grows.  I am new to php and not sure how to accomplish this.</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;$100,000 Cash Flow 2013&lt;/li&gt;
  &lt;ul&gt;
  &lt;li&gt;Sell Iron Oak&lt;/li&gt;
  &lt;ul&gt;
  &lt;li&gt;ask her if she would like to buy&lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul&gt;
  &lt;li&gt;Sell Car&lt;/li&gt;
  &lt;/ul&gt;etc...
  </code></pre>
  
  <p>Any help will be greatly appreciated! Thank you in advance!</p>