/ Published in: PHP

This came in handy when I was working with Hour / Minute / Second dropdown on a page.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function seconds($seconds) { // CONVERT TO HH:MM:SS $remainder_1 = ($seconds % 3600); $seconds = ($remainder_1 % 60); // PREP THE VALUES $hours = "0".$hours; } $minutes = "0".$minutes; } $seconds = "0".$seconds; } return $hours.":".$minutes.":".$seconds; }
URL: http://www.aristoworks.com
Comments
