[!--quoteo(post=354951:date=Mar 14 2006, 05:13 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Mar 14 2006, 05:13 PM) [snapback]354951[/snapback][/div][div class=\'quotemain\'][!--quotec--] <? $today = date("Y-m-d"); $result = mysql_query("SELECT * FROM gigs WHERE date >= '$today' ORDER BY date ASC"); $month=1; while($myrow = mysql_fetch_assoc($result)) { $date = $myrow['date']; list($year, $month, $day) = split("-", $date); $monthname=date('M', mktime(0, 0, 0, $month, $day, $year)); $date = date('d', mktime(0, 0, 0, $month, $day, $year)); if ($year != $lastyear) { echo("<B>Year $year</B><Br>"); } if ($month != $lastmonth) { echo("<B>$monthname</B><Br>"); } ?> <? echo $date; ?> - <a href="?pg=gi&id=<? echo $myrow[id]; ?>"><? echo $myrow['headline']; ?></a></b><br> <? $lastmonth=$month; $lastyear=$year; } ?> that should show year, month and then the day of each month :) [/quote] you are so awesome :p i'm at work now, can't fix it till tomorrow, so i'll update with solved etc tomorrow! BTW - i gave the wrong URL in 1st post - [a href=\"http://www.josephswell.co.uk/x/\" target=\"_blank\"]http://www.josephswell.co.uk/x/[/a]