php common functions

WBOY
Release: 2016-07-30 13:30:48
Original
1005 people have browsed it

Get the time from the 1st to the last day of the previous month:

echo date('Y-m-01', strtotime('-1 month'));
echo '
';
echo date('Y-m-t ', strtotime('-1 month'));

and the following

echo date('Y-m-01 00:00:00', strtotime('-1 month'));
echo 'echo date('Y-m-t 23:59:59', strtotime('-1 month'));

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above has introduced the commonly used functions of PHP, including related content. 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