dbradbury Posted December 22, 2009 Share Posted December 22, 2009 i posted about converting dates, and well ive completed that now now i have all my dates in order, closest first... so from todays date [2009/12/22] its: 2009/12/23 2009/12/24 and so on... where the month changes aswell... now is it possible to group the dates? so have all december in a paragraph for table cell...? or even have a line break or two when the month or year changes? and if you understood that, im impressed lol thanks for looking! Link to comment https://forums.phpfreaks.com/topic/186075-sort-dates-into-months-and-years/ Share on other sites More sharing options...
teamatomic Posted December 22, 2009 Share Posted December 22, 2009 show the code you use to display your dates list. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/186075-sort-dates-into-months-and-years/#findComment-982675 Share on other sites More sharing options...
dbradbury Posted December 22, 2009 Author Share Posted December 22, 2009 this is the part that actually displays them... $date = date('l jS F Y', strtotime($row['post_subject'])); echo '<tr><td width="auto" valign="top" align="right">'.$date.'</td><td width="20px" valign="top"> - </td><td width="auto" valign="top">'.nl2br($row['post_text']).'</td></tr>'; you may already know what it does, but for those who dont, the $date is setting the inputted data to be converted to a certain text/number and such.. Link to comment https://forums.phpfreaks.com/topic/186075-sort-dates-into-months-and-years/#findComment-982742 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.