Scroll to top

How to get all months in php?


Notice: Undefined variable: string in /home/u665484253/domains/wpcodekit.com/public_html/wp-content/themes/twentytwenty-child/functions.php on line 61

Get all months in php

for ($m=1; $m<=12; $m++)
{
$month = date(‘F’, mktime(0,0,0,$m, 1, date(‘Y’)));
                                     echo $month;
                               }

Get more information

Read More Posts

Leave a Reply

Your email address will not be published.