I have an xml file where the date stored in this format:
<timer>4742086</timer> <- this is not in seconds!
My php process this value to a variable named $timer
This value is a countdown timer (I think its in epoch format)
The problem with this its just a string. I don't have any idea how to convert it to a format like
2 hour 20 minutes 30 seconds remaining
"); $hrs = floor($timer / 3600); $mns = floor(($timer - ($hrs*3600)) / 60); $scs = floor($timer % 60); echo $hrs.':'.$mns.':'.$scs;` But this will show `1317:14:46` and this can not be more that 3 hours @MarcB – Gable May 30 '14 at 14:54