PHP: date function to get month of the current date

See http://php.net/date

date('m') or date('n') or date('F') …

Update

m Numeric representation of a month, with leading zeros 01 through 12

n Numeric representation of a month, without leading zeros 1 through 12

F Alphabetic representation of a month January through December

….see the docs link for even more options.

Leave a Comment