开发者

Formatting a date in PHP

This is what my current code this look:

<?php echo $user_join_date; ?>

This is what it echo's:

2011-04-24

I want it to echo this:

开发者_StackOverflow

April 4th, 2011

What is the easiest way to that?


<?php echo date('F jS, Y', strtotime($user_join_date)); ?>

See the date function

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜