php time processing
思何
思何 2018-11-06 16:47:44
0
1
1197

echo date('Ymt',strtotime('201812'));


The result is: 20181130


## I don’t know why this is the result instead of 20181231. I hope you guys can give me some answers.


思何
思何

reply all(1)
依稀往梦似曾见

strtotime This function means generating a timestamp. If strtotime(' -1days') is like this, it is the timestamp of this time yesterday. If you want to output the date, time, minutes and seconds. echo date('Y-m-d H:i:s'); or echo date('Y-m-d H:i:s',strtotime('-1days')); You can also replace now This function has more parameters. Go read the manual

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!