Hello,
i am working with time system for my new game if they make a building they get a time how long it takes before its done but now am getting confused
how i can make it show like this ;
HOURS : MINUTES : SECONDS
i got this ..
PHP Code:
$now = date("Y-n-d H:i:s");
$to_time=strtotime($logs['time']); //time when it should be done 2009-08-18 23:15:59
$from_time=strtotime($now); // time now 2009-08-18 21:22:59
$timeleft = round(abs($to_time - $from_time) / 60);
$timeleft = str_replace(".", ":", $timeleft);
echo "<tr><td>".$logs['name']."</td><td>".round($timeleft)." minute('s)</td></tr>";
then it shows 114 minute('s)
so how i can make it like :
HOURS : MINUTES : SECONDS
thanks alot so far,
passie