作者:
lusaka (gary.lusifa)
2018-01-22 18:31:23※ 引述《kyoe (緣份‧不再)》之銘言:
: <?
: $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>
: 這樣嗎?
kyoe大大您好
感謝您提供您提供思路,但是顯示的結果如下:
$start_date = 1970-01-01
$end_date = 1970-01-01