I am trying to display a date range for each month.
For example,
November 2013 -- 2013-11-01 - 2013-11-30 //for month Nov
December 2013 -- 2013-12-01 - 2013-12-31 //for month Dec
January 2013 -- 2014-01-01 - 2014-01-31 //for month jan 2014
so on till dec 2014
PHP code:
$currentmonth = date('n');
$monthstoloop = $currentmonth + 13;
for ($m=$currentmonth; $m<=$monthstoloop; $m++) {
$month = date('F', mktime(0,0,0,$m, 1, date('Y')));
$year = date('Y', mktime(0,0,0,$m, 1, date('Y')));
echo $month." ".$year;
}
I am not finding a way to display the month range just beside the year.Please suggest.