PHP: Problem with strtotime

前端 未结 4 1549
长发绾君心
长发绾君心 2020-12-21 19:02

What\'s going on with strtotime here?

$today = date(\'m.d.y H:i\', time());
echo strtotime($today);

It does not output anything... What\'s

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-21 19:29

    strtotime works with US dates. Try

    $today = date('m/d/y H:i', time());
    echo strtotime($today);
    

提交回复
热议问题