<?php
if($timegame<60){
echo "$timegame сек.";

}elseif($timegame>=60 and $timegame<3600){
$timegame=round($timegame/60);
echo "$timegame мин.";

}elseif($timegame>=3600 and $timegame<86400){
$timegame=round($timegame/3600);
echo "$timegame час.";

}elseif($timegame>=86400){
$timegame=round($timegame/86400);
echo "$timegame дн.";}
?>