DeusModus - я долго въезжал, чего же ты хочешь
Вот компактный красивый код от Chestr'a:
PHP код:
function getTimeText($seconds)
{
$text = "";
if ($seconds >=24*3600) {$text.= intval($seconds/(24*3600))." days"; if ($seconds%=24*3600) $text.=" ";}
if ($seconds >= 3600) {$text.= intval($seconds/3600)." hours"; if ($seconds%=3600) $text.=" ";}
if ($seconds >= 60) {$text.= intval($seconds/60)." min"; if ($seconds%=60) $text.=" ";}
if ($seconds > 0) {$text.= $seconds." sec";}
return $text;
}