title: Best way to display a list of events by month
body: <p>I have a mySQL table of events and want to display them in a list using PHP. Pretty simple, except I only want to display the month name once, for example:</p>
  
  <blockquote>
    <p><b>May 2010</b><br>
    12th, 7 pm. Event 1 - event one description<br>
    15th, 5:30 pm. Event 2 - event two description
    <br><br>
    <b>June 2010</b><br>
    9th, 7 pm. Event 1 - event one description<br>
    11th, 5:30 pm. Event 2 - event two description</p>
  </blockquote>
  
  <p>I'm very new at SQL and PHP. I can think of one way to do it. It would involve selecting all records grouped by date, then looping through all records, comparing the month/year value each time and the first time the month/year doesn't match, print a new header row to my HTML table. I can't believe it's the best or most efficient way to go. Any ideas for a newbie? I'm sure my way would work, but it's inelegant at best, and processor-intensive at worst.</p>