Home

Monday, September 5, 2011

Convert seconds to Hour:Minute:Second in php

<?php

$init = 685;
$hours = floor($init / 3600);
$minutes = floor(($init / 60) % 60);
$seconds = $init % 60;

echo "$hours:$minutes:$seconds";
?>

No comments:

Post a Comment

rathoddhirendra.blogspot.com-Google pagerank and Worth