Notice warning appears when formatting timestamp field in PHP. How to solve it?
在远处
在远处 2019-02-21 15:14:36
0
2
991

You can see that the correct results are output, but a warning appears. How to solve it?

无标题.png

code show as below:

微信截图_20190221151255.png

在远处
在远处

reply all(1)
在远处

It turns out that what is taken out seems to be in time format, but is actually a string. Use strtotime() to solve the problem.

The code is posted below:

$dataMonth=date('m',strtotime($row['creation time'])) ;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template