-4

I can't seem to get this date format correct.

I'm looking to display the current date like this: Wednesday, May 16th

Any help would be appreciated.

Thanks :)

user1702965
  • 379
  • 5
  • 16
  • 7
    Check out the [PHP date documentation](http://php.net/manual/en/function.date.php), it covers everything you need and has lots of examples. – cteski May 16 '18 at 21:55
  • Possible duplicate of [How to find the date of a day of the week from a date using PHP?](https://stackoverflow.com/questions/12835133/how-to-find-the-date-of-a-day-of-the-week-from-a-date-using-php) – Rogério Dec May 16 '18 at 21:57

2 Answers2

1
echo date('l,M jS');

php manual http://php.net/manual/en/function.date.php

0

If you want leading zeroes (e.g. "Wednesday, May 02nd"):

date("l, F sS");

If you do not want leading zeroes (e.g. "Wednesday, May 2nd"):

date("l, F jS");
Fahad Sadah
  • 2,368
  • 3
  • 18
  • 27