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