I have a database with birthday posts that's grouped by the month. How do I make a "category" for the year, then have the month as the subcategory?
What I have Now:
January 2006, February 2006,...January 2007,..May 2007
Example Output of what I'm trying to do:
2007
January >> February >> March etc
2006
January >> February >> March >> April
$result = mysql_query("SELECT FROM_UNIXTIME( time, '/%M/%Y/' ) AS get_year, time FROM `birthday` GROUP BY get_year ORDER BY time DESC;");
while ($row = mysql_fetch_array($result)) {
$get_year = $row['get_year'];
echo "<a href=\"index.php?date=$get_year\">$get_year</a>";
}