謝晒的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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment