Need to find years months and seconds!

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]

[php]
$years = floor($total / (365606024));
$months = floor(($total - $years * 365
606024) / (30606024));
$days = floor(($total - $years * 365
606024 - $months30606024)/ (606024));
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service