转:http://zhidao.baidu.com/question/2052196957516833387.html
http://blog.sina.com.cn/s/blog_979d1c9f0101sk71.html
<?php
function getSeconds($string){ $arr = explode(':', $string); $len = count($arr); return (int)$arr[$len - 1] + (int)$arr[$len - 2] * 60 + (($len > 2 ? (int)$arr[$len - 3] : 0) * 60 * 60); }
?>
<?php echo gmstrftime('%H:%M:%S',800); ?>
显示格式如下:00:03:27
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:php秒分钟互换 出自老鄢博客 | 欢迎分享