Copy code The code is as follows:
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);
}
The above introduces the code for getting the first and last day of a month using php on the last day of school, including the content of the last day of school. I hope it will be helpful to friends who are interested in PHP tutorials.