How to display the date and time with PHP and MySQL?
Okay I kind of know how to display the time with PHP and My开发者_StackOverflow社区SQL but I need a little help.
I want to display the time something like this in the example below.
August 5, 2010 @ 8:47:28 PM
Here is the code I have so far that is listed below.
date('F j, Y', strtotime($date_created))
Did you use the chart at http://www.php.net/manual/en/function.date.php to see which characters you need for hour/minute/seconds and AM/PM? For the @ you just hardcode it in.
date('F j, Y @ g:i:s A', $whatever);
精彩评论