Re: [請益] 請教一個日期條件設計問題消失
<?
$birthday="1911-05-03";
$birthday=date("Y")."-".date("m",strtotime($birthday))."-".date("d",strtotime($birthday));
$start_date = date("Y-m-d", strtotime('last day of -1 month', strtotime($birthday)) );
$end_date = date("Y-m-d", strtotime('last day of 0 month', strtotime($birthday)) );
?>
<p><?echo "$start_date";?></p>
<p><?echo "$end_date";?></p>
這樣嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.92.145
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1516596014.A.64B.html
→
01/22 18:16, , 1F
01/22 18:16, 1F
→
01/22 19:20, , 2F
01/22 19:20, 2F
→
01/23 09:47, , 3F
01/23 09:47, 3F
→
01/23 09:53, , 4F
01/23 09:53, 4F
討論串 (同標題文章)
完整討論串 (本文為第 3 之 10 篇):