I have a site that currently shows you their mailer dependent upon the date. They show this month, the previous month and the month before that, so that on December it also shows November and October. But now that is January, it shows December and December. Here is the code and I've been working on it for a few hours now and even attempted at looking at Calendar scripts, but they don't need to list the previous TWO months. Can someone help. Here is the code I'm trying to debug. It's work until now...:
$todayDate = date("F"
;
$backm_one = mktime (0,0,0,date("m"
,0,0);
$backm_two = mktime (0,0,0,date("m"
-1,0,0);
$oneMonth = date("F", $backm_one);
$twoMonth = date("F", $backm_two);
print $today . " " . $oneMonth . " " . $twoMonth;
This will print out March through December: CurrentMonth PreviousMonth TwoMonthsAgo (ie September August July) etc.
but on February and January, it prints out: January/February December December
Can anyone help or point me to the right direction?
Thank You
$todayDate = date("F"
$backm_one = mktime (0,0,0,date("m"
$backm_two = mktime (0,0,0,date("m"
$oneMonth = date("F", $backm_one);
$twoMonth = date("F", $backm_two);
print $today . " " . $oneMonth . " " . $twoMonth;
This will print out March through December: CurrentMonth PreviousMonth TwoMonthsAgo (ie September August July) etc.
but on February and January, it prints out: January/February December December
Can anyone help or point me to the right direction?
Thank You