On the last day of school, use php to get the code for the first and last day of the month.

WBOY
Release: 2016-07-29 08:42:44
Original
913 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template