我的mysql数据库中有一个名为sbuscriptionexpires的时间戳字段。我把它设置在我的会话中
Array (
[userid] => 6
[ufname] => Kamal
[ulname] => Roberts
[uemail] => dbs@gmail.com
[phone] => 5148036843
[otherdetails] =>
[isactive] => yes
[memid] => 1
[memdate] => 0000-00-00 00:00:00
[sbuscriptionexpires] => 2018-02-28 00:00:00
[userprofilepic] =>
)
但是,当我回显日期时,它只显示为空白
<p>Subscription Expires:
<?php echo date('m/d/Y', usbuscriptionexpires); ?>
</p>
它应该打印出来
2018-02-28
答案 0 :(得分:2)
尝试 <p>Subscription Expires:
<?php
echo date('m/d/Y', strtotime($usbuscriptionexpires));
?>
</p>
:
$onInit()
答案 1 :(得分:1)
Button