This question already has an answer here:
I got working times type is second.How can I convert 6010 second to 0 day ,0 hour ,10 min ,10 second in php?
</div>
You will want an integer division technique.
days = seconds / ( 24 * 60 * 60 )
seconds -= ( days * ( 24 * 60 * 60 ) )
hours = seconds / ( 60 * 60 )
seconds -= ( hours * ( 60 * 60 ) )
minutes = seconds / 60
seconds -= ( minutes * 60 )
Implementing this in PHP should be trivial.
Try this.
$hours = floor($seconds / 3600);
$mins = floor(($seconds - ($hours*3600)) / 60);