How to remove 0 from php date: First open the corresponding PHP file; then change the date method to "date('Y-n-j', time())".
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
About whether there is 0 in the PHP date prefix
For example: 2018-01-04, the date and month are preceded by 0
If you don’t want to have 0, date('y-n-j',time()); The default is date('y-m-d',time()), the date and month are preceded by 0.
date('Y-n-j',time())和date( 'y-m-d',time() ):
m, n is the month, do not add 0 in front of n;; d, j is the date, do not add 0 in front of j.
[Recommended learning: "PHP Video Tutorial"]
The above is the detailed content of How to remove 0 from date in php. For more information, please follow other related articles on the PHP Chinese website!