php获取一个月第一天与最后一天直接上代码,其实是个很简单的东东 function getthemonth($date) { $firstday = date('Y-m-01', strtotime($date)); $lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day")); return array($firstday, $lastday); }