【发布时间】:2015-05-06 05:20:35
【问题描述】:
显示值时出现错误:
$thedate = $row2['date'];
echo $thedate;
在php中,数据库中的值($thedate)是“2015-05-05 21:52:31.000”
我怎样才能格式化它以便能够在 php 页面上以字符串的形式显示它?目前它显示错误“类 DateTime 的对象无法转换为字符串”。
【问题讨论】:
显示值时出现错误:
$thedate = $row2['date'];
echo $thedate;
在php中,数据库中的值($thedate)是“2015-05-05 21:52:31.000”
我怎样才能格式化它以便能够在 php 页面上以字符串的形式显示它?目前它显示错误“类 DateTime 的对象无法转换为字符串”。
【问题讨论】:
【讨论】: