how would I get the years months and seconds from this? As it stands it works great now but I have no idea how to get the rest.
[php]function showOnlineTime(){
//Make DB connection here
global $db;
$result = sqlite_query($db, "SELECT time_online FROM login WHERE username = '{$_SESSION['name']}'");
if(sqlite_num_rows($result) > 0){
list($total) = sqlite_fetch_array($result, SQLITE_NUM);
$days = floor($total / 86400);
$hours = floor(($total % 86400) / 3600);
$minutes = floor(($total % 3600) / 60);
echo "<font color='white'>Time Online: $days days, $hours hours and $minutes minutes.</font>";
}else{
echo "No Logged Time Available";
}
}[/php]