Home > Backend Development > PHP Tutorial > php gets today's start time and end time

php gets today's start time and end time

高洛峰
Release: 2023-03-06 09:24:02
Original
2181 people have browsed it

The example of this article describes the method of getting today's start time and end time in PHP. It has a very good reference value. Let's take a look at it with the editor.

Without further ado, please look at the code :

$begintime=date("Y-m-d H:i:s",mktime(0,0,0,date('m'),date('d'),date('Y')));
$endtime=date("Y-m-d H:i:s",mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1);
Copy after login

For more articles related to PHP getting today’s start time and end time, please pay attention to the PHP Chinese website!

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