Last active
September 20, 2017 05:41
-
-
Save tisuchi/92f6b6df317415c9a570d3f435612504 to your computer and use it in GitHub Desktop.
Convert number to month name in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// here, 1 means the first month of Year | |
$monthNumber = 1; //month in number | |
//it will return the name of the month | |
$getMonthName = date('F', mktime(0, 0, 0, $monthNum, 10)); // January | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment