扫码关注官方订阅号
20160313t212947
改成 2016-03-13 21:29:47
有没有正则表达式简单一点搞定?
业精于勤,荒于嬉;行成于思,毁于随。
为什么用这种格式的时间?
使用 strtotime 函数
$timestamp = strtotime('20160313t212947'); echo date('Y-m-d H-i-s', $timestamp);
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
为什么用这种格式的时间?
使用 strtotime 函数