title: Group Rows in HTML Table from PHP Array
body: <p>Assume I have this array from a query results:</p>
  
  <pre><code>[0]=&gt; { ["category"]=&gt; "fruit" ["value"]=&gt; "banana"} 
  [1]=&gt; { ["category"]=&gt; "fruit" ["value"]=&gt; "grape"}
  [2]=&gt; { ["category"]=&gt; "fruit" ["value"]=&gt; "pineapple"}    
  [3]=&gt; { ["category"]=&gt; "animal" ["value"]=&gt; "mouse"}    
  [4]=&gt; { ["category"]=&gt; "animal" ["value"]=&gt; "elephant"}    
  [5]=&gt; { ["category"]=&gt; "animal" ["value"]=&gt; "ant"}   
  </code></pre>
  
  <p>How to make an HTML table which same group shows only once and make <code>td rowspan</code>value in group field(<code>category</code>) according to number of members?</p>
  
  <p>Desired result:</p>
  
  <pre><code>--------------------
  |fruit   |banana   |
  |        -----------
  |        |grape    |
  |        -----------
  |        |pinapple |
  --------------------
  |animal  |mouse    |
  |        -----------
  |        |elephant |
  |        -----------
  |        |ant      |
  ---------------------
  </code></pre>