0
$date = "2015 05 06 00:00:00";
我需要顯示像Wednesday, May 6th, 2015
。這是我迄今爲止嘗試:
echo $endDateValue=date('l, F jS, Y',strtotime($date . "+1 days"));
$date = "2015 05 06 00:00:00";
我需要顯示像Wednesday, May 6th, 2015
。這是我迄今爲止嘗試:
echo $endDateValue=date('l, F jS, Y',strtotime($date . "+1 days"));
使用此代碼
<?php
$date = strtotime("2015 05 06 00:00:00");
echo $endDateValue=date('l, F jS, Y',strtotime($date . "+1 days"));
?>
當你有Y和M之間m和d之間的空隙,會帶您需要讓PHP知道你的格式是:'$ endDateValue = DateTime :: createFromFormat('Y md H:i:s',$ date); echo $ endDateValue-> format('l,F jS,Y');' –
閱讀說明書http://php.net/manual/en/function.date.php – Saty
@Mark Baker:這是工作,感謝很多 –