开发者

Formatting a date in PHP

开发者 https://www.devze.com 2023-03-04 20:06 出处:网络
This is what my current code this look: <?php echo $user_join_date; ?> This is what it echo\'s: 2011-04-24

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

精彩评论

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