时间:2021-07-01 10:21:17 帮助过:8人阅读
代码如下:
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);
}以上就是php 怎么获取一个月的第一天与最后一天?的详细内容,更多请关注Gxl网其它相关文章!