I am trying to figure out how to show a number between 1 to 12, as the corresponding month.
Something similar to this:
$newmonth = 4;
echo "Month: " . date("M",$newmonth);
I want the output to show “Apr”.
Since I’m only working with a single date element (the month) I don’t have the ability to use the strtotime functon.
Any ideas how I could do this without having to build a reference table for the 12 months and corresponding days?