For the code below i want to have the current month and the next 12 months with the year. Im using a loop for it, everyting works fine except for "January". And i just don't know whats going wrong.
for ($i = 0; $i <= 12; $i++) {
$months[ucfirst(strftime("%B %G", strtotime( date( 'Y-m' )." +$i months")))] = ucfirst(strftime("%B %G", strtotime( date( 'Y-m' )." +$i months")));
echo ucfirst(strftime("%B %G", strtotime( date( 'Y-m' )." +$i months")));
}
The echo output:
December 2015 Januari 2015 Februari 2016 Maart 2016 April 2016 Mei 2016 Juni 2016 Juli 2016 Augustus 2016 September 2016 Oktober 2016 November 2016 December 2016
date('M-y')
rather than('Y-m')