like if year = 2012 i will start from 2012 and the current month ...and decrement the month till January..
and if year less than curr year like 2011 fetch all month..
let say we are in year 2013 so the output is
2013 from month 12 to 1
and 2012 from month 12 to 1
and 2011 from month 12 to 1
i want to modify it to be like
2013 from current month to 1
and 2012 from month 12 to 1
and 2011 from month 12 to 1
PHPWeb Languages and StandardsWeb Development
Last Comment
Ray Paseur
8/22/2022 - Mon
darren-w-
well to get months this year to today:
<?php $thisYear = range(1,date("n"));foreach ($thisYear as $month){print date("F",mktime(0,0,0,$month,10));}//previous years :$thisYear = range(1,12); //then just add years
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Open in new window