謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
Friday, August 31, 2018
[PHP] 找出月份的第一天及最後一天
//指定日期
$d = '2018-02-15';
$startdate = date('Y-m-01', strtotime($d));
$enddate = date('Y-m-t', strtotime($d));
//當下日期
$startdate = date('Y-m-01');
$enddate = date('Y-m-t');
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment