将秒转换为时:分:秒 [英] Convert seconds to Hour:Minute:Second

查看:38
本文介绍了将秒转换为时:分:秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将秒转换为时:分:秒".

I need to convert seconds to "Hour:Minute:Second".

例如:685"转换为00:11:25"

For example: "685" converted to "00:11:25"

我怎样才能做到这一点?

How can I achieve this?

推荐答案

你可以使用 gmdate() 功能:

You can use the gmdate() function:

echo gmdate("H:i:s", 685);

这篇关于将秒转换为时:分:秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆