title: grouping by class in groups
body: <p>Run out of ideas... I need to group all entries form database. There are fields ID, NAME, CLASS, CREATED. Output would look like this:</p>
  
  <pre><code>&lt;h2&gt;3. Class&lt;/h2&gt;
  &lt;div class="cont"&gt;
   3rd class entries..
  &lt;/div&gt;
  
  &lt;h2&gt;8. Class&lt;/h2&gt;
  &lt;div class="cont"&gt;
   8th class entries..
  &lt;/div&gt;
  
  ... and more
  </code></pre>
  
  <p>So if there are entries with class 3, they all go in their own <code>&lt;div&gt;</code> with their own heading - <code>&lt;h3&gt;</code>. The same thing with 8, 9,10, 545,5357 etc. Numbers within <code>&lt;h3&gt;...&lt;/h3&gt;</code> are taken form the table, so they do not come from a counter like <code>$i++</code>.</p>
  
  <p>How to achieve that? I hope you got my idea.</p>