>From: "Bob Irwin" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 7:27 PM
>Subject: [PHP] Seconds to minutes
> At the moment, I'm using quite a few lines of code to convert seconds to
> minutes and hours. I'm thinking, surely I'm missing something really
> simple! Is there a PHP function that converts seconds to minutes? Or is
it
> a 4 or 5 (and not always that accurate) lines of code?
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";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php