Skip to content

Instantly share code, notes, and snippets.

@rabinkumarpal
Forked from kosinix/gist:5354637
Created January 14, 2024 05:54
Show Gist options
  • Save rabinkumarpal/9143ec6fb0bcca86de2631c965ccf437 to your computer and use it in GitHub Desktop.
Save rabinkumarpal/9143ec6fb0bcca86de2631c965ccf437 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>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment