将秒转换为小时:分钟:秒 [英] Convert seconds to Hour:Minute:Second
本文介绍了将秒转换为小时:分钟:秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将秒转换为小时:分钟:秒".
I need to convert seconds to "Hour:Minute:Second".
例如:"685"转换为"00:11:25"
For example: "685" converted to "00:11:25"
我该如何实现?
推荐答案
您可以使用 gmdate()
功能:
You can use the gmdate()
function:
echo gmdate("H:i:s", 685);
这篇关于将秒转换为小时:分钟:秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文