<?php $showtime2=strtotime($myrow["updatetime"]);
echo date("D d,M Y",$showtime2);?>
其中
updatetime,形如2008-06-20 01:16:20
格式化后,形如 形如(Wed 30,Jul 2008)
本文介绍了一段PHP代码,该代码演示了如何将数据库中存储的日期时间格式转换为更易读的形式。具体来说,它使用PHP内置函数strtotime来解析日期时间字符串,并通过date函数将其格式化为指定的样式。
<?php $showtime2=strtotime($myrow["updatetime"]);
echo date("D d,M Y",$showtime2);?>
其中
updatetime,形如2008-06-20 01:16:20
格式化后,形如 形如(Wed 30,Jul 2008)

被折叠的 条评论
为什么被折叠?