Skip to content

Instantly share code, notes, and snippets.

@tisuchi
Last active September 20, 2017 05:41
Show Gist options
  • Save tisuchi/92f6b6df317415c9a570d3f435612504 to your computer and use it in GitHub Desktop.
Save tisuchi/92f6b6df317415c9a570d3f435612504 to your computer and use it in GitHub Desktop.
Convert number to month name in PHP
<?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