7

I have a date in my php function like following:

2016-05-17 16:41:51

Is there some way for me to get the month name from this date in PHP ?

perkes456
  • 1,163
  • 4
  • 23
  • 47

1 Answers1

28

Using the F in the date parameter you can get the month name.

echo date("F", strtotime('2016-05-17 16:41:51')); //May

More details

Murad Hasan
  • 9,418
  • 2
  • 19
  • 40