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
  • 25
  • 49

1 Answers1

30

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,565
  • 2
  • 21
  • 42