如何在PHP中将2017-03-01
转换为March 1st 2017
格式。将2017-03-01转换为2017年3月1日格式inPHP
$mark_entry_last_date=$exam_dates['last_date'];
echo date('M j<\sup>S</\sup> Y', $mark_entry_last_date);
以上代码仅输出当前日期,但我需要$ mark_entry_last_date的日期值。如何在2017年3月1日之前使用转义字符获得给定日期的结果。 ?
使用'的strtotime()''到$ mark_entry_last_date',检查[这里](http://ideone.com/xcBEdU) – Fabio
[Strtotime()的可能重复不适用于dd/mm/YYYY格式](http://stackoverflow.com/questions/2891937/strtotime-doesnt-work-with-dd-mm-yyyy-format) –