0

what I got here:

<?php echo stripslashes($row['date']); ?>

I want to customize how the date is displayed like:

date("l, F jS Y");

I know there's a way to do it inside that string rather than doing it in the database, would any of you happen to know?

TrippedStackers
  • 427
  • 1
  • 4
  • 17
  • Is date a timestamp, datetime, or date field type? – Misiur Mar 30 '14 at 18:55
  • possible duplicate of [Where can I find documentation on formatting a date in JavaScript](http://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript) – Nurdin Mar 30 '14 at 18:55
  • 3
    Use the second parameter for `date()` combined with `strtotime()`: `date("l, F jS Y", strtotime(stripslashes($row['date']));` – Amal Murali Mar 30 '14 at 18:55
  • @Dato'MohammadNurdin: From where does JavaScript come into the picture? – Amal Murali Mar 30 '14 at 18:57
  • possible duplicate of [Convert one date format into another in PHP](http://stackoverflow.com/questions/2167916/convert-one-date-format-into-another-in-php) – Amal Murali Mar 30 '14 at 18:57
  • Could you post the solutions for us to expand our knowledge? – Oscar Pérez Mar 30 '14 at 19:14

0 Answers0