Very nice.
function stot($s) {
$tt = "";
//years
$y = floor($s / (60 * 60 * 24 * 365));
if ($y > 0)
$tt .= $y." years, ";
$s -= ($y * (60 * 60 * 24 * 365));
//days
$d = floor($s / (60 * 60 * 24));
if ($d > 0)
$tt .= $d . " days, ";
$s -= ($d * (60 * 60 * 24));
//hours
$h = floor($s / (60 * 60));
if ($h > 0)
$tt .= $h . " hours, ";
$s -= ($h * (60 * 60));
//minutes
$m = floor($s / 60);
if ($h > 0)
$tt .= $m . " minutes, ";
$s -= ($m * 60);
//seconds
$tt .= $s . " seconds.";
return $tt;
}
Made an addition for years to it, as I was just testing and 1865days doesnt look very nice, also its not totally accurate when adding years because of leap years if you wish to use the modified version you may want to check that.
Other than that I cant find anything wrong with what you have.