php method to get what day it is today: 1. Create a PHP sample file; 2. Get what day it is through the "echo date('d')" method.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3.
How to get what day is today in php?
php gets the day of the day and the day of the week
The code is as follows:
echo date('y').'</br>'; //当前年份 echo date('m').'</br>'; //当前月份 echo date('d').'</br>'; //当前日 echo date('s').'</br>'; //当前秒 echo date('w').'</br>'; //当前周几
Print as follows
Recommended learning: "PHP video tutorial"
The above is the detailed content of How to get today's date in php. For more information, please follow other related articles on the PHP Chinese website!