How to output only date in php: first open the database; then design the time field type of the database; finally use the strtotime() function to output the date.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
This is the time field type of the design database
Time data of database
tp output and native output
Use strtotime() function output
For the convenience of output, the native output is written here. Use date to intercept only the date
#Rendering, this is not a timestamp, so the date is converted and output without detailed time
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to output only date in php. For more information, please follow other related articles on the PHP Chinese website!