I am getting an error with displaying the value:
我在显示值时出错:
$thedate = $row2['date'];
echo $thedate;
In php, which is a value from the database ($thedate) is "2015-05-05 21:52:31.000"
在php中,它是来自数据库的值($thedate)是“2015-05 21:52:31.000”
How can I format it to be able to display it on the php page as a string? Currently it shows error "Object of class DateTime could not be converted to string".
如何将其格式化,使其能够以字符串形式显示在php页面上?目前它显示错误“类DateTime不能转换为string”。