PHP时间戳和日期相互转换

        //将获取到的时间2018-01-25转换成时间戳1516809600
        echo strtotime($_GET ['cal1']);
        //将时间戳转换成年-月-日的形式
        echo date("Y-m-d ", strtotime($_GET ['cal1']) );

猜你喜欢

转载自blog.csdn.net/qq_33867131/article/details/79158285