title: Counting number of events per week in PHP
body: <p>I have a table which contains members signups and I would like to be able to start doing some charting and analysis on the data and look for signup trends etc so I would like to be able to plot a line graph which shows me how many people signed up each week for the last 52 weeks.</p>
  
  <p>I have got graphs working OK as I am using them extensively already but am struggling to get my head around how to extract the data from MySQL using PHP which is annoying me as I know it shouldn't be difficult - the table has a field called datestamp with a format of Y-m-d. How best can I create a loop which prints the date and a count for sign ups that week and each week for 52 previous weeks?</p>