mysql timestamp conversion/formatting Notice: A non well formed numeric value encountered

前端 未结 1 1322
滥情空心
滥情空心 2021-01-12 02:43

In my database I have set row \"posted\" as a timestamp but I get this notice when trying to convert/format it:

Notice: A non well formed numeric value encou         


        
相关标签:
1条回答
  • 2021-01-12 03:11

    This means that the second parameter for date() is expecting integer, so convert $row['posted'] to timestamp first.

    Try

    $posted = date('d/m/Y H:i:s', strtotime($row['posted']));
    
    0 讨论(0)
提交回复
热议问题