How to Convert Seconds to Minute ?

There are 2 ways to convert Seconds into minute. Its super simple.

One - 
$seconds = "110";
$minutes = floor($seconds/60);
$secondsleft = $seconds%60;
if($minutes<10)
    $minutes = "0" . $minutes;
if($secondsleft<10)
    $secondsleft = "0" . $secondsleft;
echo "$minutes:$secondsleft Sec";
echo "
"; Two - echo gmdate("i.s", $seconds);
Share

Leave a Reply

Your email address will not be published. Required fields are marked *