3
我得到一个错误与显示值:错误:类的DateTime的对象无法转换为字符串
$thedate = $row2['date'];
echo $thedate;
在PHP中,这是从数据库中的值($ thedate)是“2015 - 05-05 21:52:31.000“
我该如何格式化它才能够将它作为字符串显示在php页面上?目前它显示错误“类DateTime的对象无法转换为字符串”。
我得到一个错误与显示值:错误:类的DateTime的对象无法转换为字符串
$thedate = $row2['date'];
echo $thedate;
在PHP中,这是从数据库中的值($ thedate)是“2015 - 05-05 21:52:31.000“
我该如何格式化它才能够将它作为字符串显示在php页面上?目前它显示错误“类DateTime的对象无法转换为字符串”。
工作,谢谢! – user3342443
@ user3342443不客气! (仅供参考:您可以在这里参观一下:http://stackoverflow.com/tour,看看这个网站是如何工作的以及在哪里都是) – Rizier123
@ Rizier123 [早些时候我给了OP一个礼貌的推动](https:// stackoverflow//问题/ 44747263/jquery-submit-does-not-work-after-ajax-pagination?noredirect = 1#comment76475545_44747263)但他们删除了[that question](https://stackoverflow.com/q/44747263/1415724) ),并决定改为[转贴](https://stackoverflow.com/q/44750977/)。 –