Its seems far more reliable than what I am using (dividing by 60 for
minutes, 3600 for hours and doing rounding, exploding if its not a round
number etc).

Its only for measuring short times, so Matt's suggestion should work ok.
Ideally though, because it will crop up from time to time, it'd be the go to
do it right the first time.

Anyone else know of a better way?

Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom
----- Original Message -----
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Matt'" <[EMAIL PROTECTED]>; "'Bob Irwin'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 12:09 PM
Subject: RE: [PHP] Seconds to minutes


> > You can do something like this:
> > <?php
> >  $seconds = 265;
> >  $time = date('i s',$seconds);
> >  $minSecs = explode(' ',$time);
> >  echo "{$minSecs[0]} minutes and {$minSecs[1]} seconds<br>\n";
> > ?>
>
> That doesn't work for anything over 3599 seconds, though...
>
> ---John Holmes...
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
>


Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to