开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜