If you have X secs, then X/60 is the numbers of hours, but if you do this directly you will get fractions of hours, which isn't what you want.
To get hours and seconds, do the following:
// $totalsecs has been defined (from the timer, or whatever ...)
$hours = floor($totalsecs/60);
$secs = $totalsecs - $hours*60;