Home

Monday, September 5, 2011

How to CONVERT seconds to minutes in php

<? $seconds = "150"; $minutes = floor($seconds/60); $secondsleft = $seconds%60; if($minutes<10)     $minutes = "0" . $minutes; if($secondsleft<10)     $secondsleft = "0" . $secondsleft; echo "$minutes:$secondsleft minutes"; ?>

No comments:

Post a Comment

rathoddhirendra.blogspot.com-Google pagerank and Worth