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);
}
?>



posted @ 2011-10-31 23:36  浪漫小生  阅读(11844)  评论(0编辑  收藏  举报