PHP Code:
function gettimemsg($sec)
{
$ds = floor($sec/60/60/24);
if($ds > 0)
{
return "$ds days";
}
$hs = floor($sec/60/60);
if($hs > 0)
{
return "$hs hours";
}
$ms = floor($sec/60);
if($ms > 0)
{
return "$ms minutes";
}
return "$sec Seconds";
}
2days 10hours 5minutes 23seconds
btw im still coding it here, i will post if i make it work
Comment