Skip to content

Instantly share code, notes, and snippets.

@kosinix
Created April 10, 2013 13:30
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kosinix/5354637 to your computer and use it in GitHub Desktop.
Save kosinix/5354637 to your computer and use it in GitHub Desktop.
Get month names using a for loop and PHP date function.
<?php
for($m=1; $m<=12; ++$m){
echo date('F', mktime(0, 0, 0, $m, 1)).'<br>';
}
@sergeliatko
Copy link

Thanks saved me time

@flaviosilveira
Copy link

Amazing!

@rizkhal
Copy link

rizkhal commented Nov 1, 2020

thanks!

@supersuryaansh
Copy link

Thanks

@dhimaskirana
Copy link

thank you..

@bhargav944
Copy link

I want month from April to march

@mureithimaina
Copy link

Save me some time, thanks

@pablim
Copy link

pablim commented May 18, 2023

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment