HTML格式的Php时间格式 [英] Php time format in HTML
本文介绍了HTML格式的Php时间格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到了
120
119
118
117
116
115 ...在我的html页面
但是我想得到
02:00
01:59
01:58
01:57
01:56
01:55 ...有没有办法转换html中出现的内容?像背景代码仍然120,119,118 ...但在html中出现正常时间
我尝试过:
if($ timeleft == 2147483647)
{
$ timeleft = 120;
}
else
{
$ timeleft + = 120-time();
}
echo $ timeleft;
Im getting
120
119
118
117
116
115... in my html page
but i want to get
02:00
01:59
01:58
01:57
01:56
01:55... is there any way to convert what appears in the html? like the background code still 120,119,118... but in the html appears "the notmal time"
What I have tried:
if($timeleft == 2147483647)
{
$timeleft = 120;
}
else
{
$timeleft += 120-time();
}
echo $timeleft;
推荐答案
timeleft == 2147483647)
{
timeleft == 2147483647)
{
timeleft = 120;
}
else
{
timeleft = 120;
}
else
{
timeleft + = 120次();
}
echo
timeleft += 120-time();
}
echo
这篇关于HTML格式的Php时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文