title: PHP MYSQL Blog Archive Menu by Year and Month
body: <p>I'm looking for an efficient way to collate all blog posts into a menu of the following format:</p>
  
  <p><strong>2012</strong></p>
  
  <ul>
  <li>August(6)</li>
  <li>September(4) </li>
  <li>October(2)</li>
  </ul>
  
  <p>Month representing the month(obviously), and the value inside the brackets representing the number of posts in that month. Once clicked, a search will then be made for all posts in that month, in that year.</p>
  
  <p>I need it to be dynamic, picking up November automatically when a post is created in that month, and carrying on into December, into 2013 etc etc...</p>
  
  <p>All I have is a UNIX timestamp for each post. I would really like to avoid using seperate functions to gather endless comlex arrays etc.</p>
  
  <p>Any help much appreciated.</p>