如何在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) –