<?php
header("Content-Type:text/html;charset=utf-8");
$date = date("Y-m-d H:i:s",time());
$firstday = date("Y-m-01",strtotime($date));
$lastday = date("Y-m-d",strtotime("$firstday +1 month -1 day")); var_dump($firstday,$lastday);
?>
<?php
header("Content-Type:text/html;charset=utf-8");
$date = date("Y-m-d H:i:s",time());
$firstday = date("Y-m-01",strtotime($date));
$lastday = date("Y-m-d",strtotime("$firstday +1 month -1 day")); var_dump($firstday,$lastday);
?>