There may be other ways of getting what you want, but it's fairly simple to do using simple math with division (/) and the modulus operator (%). The modulus operator returns the remainder of a division. A division returns a floating-point number, so you have to cast it to an integer.
Try this code:
<?
echo "<pre>4 days, 2 hours, 24 minutes, 10 seconds\n";
// total up the number of seconds in this span
$timedata = 10 + (2460) + (26060) + (4 24 60 60);
// now here's how to reconstruct it
$days = (int) ($timedata / (24 60 60));
// find the remainder of that operation
$remainder = $timedata % (24 60 60);
// now find the hours in the remainder
$hours = (int) ($remainder / (60 * 60));
// and the remainder of THAT operation
$remainder = $remainder % (60 * 60);
// now we're down to minutes
$minutes = (int)($remainder / 60);
// and what remains is ...
$seconds = $remainder % 60;
echo "$days days, $hours hours, $minutes minutes, $seconds seconds</pre>";
?>