Ok, you guys both rock. and now I feel real stupid. LOL
Thanks!
----- Original Message -----
From: "Phillip Bow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 4:42 PM
Subject: Re: [PHP] Script to convert # of seconds to HH:mm
> function philtime($time){
> $hours = (int) ($time / 3600);
> $min = (int) (($time % 3600) / 60 );
> return ("$hours:$min");
> }
> Should be 3600 since:
> 60sec = 1min
> 60min = 1hour
> 60 * 60 = 3600sec/hour
> --
> phill
>
> > How about something like this:
> >
> > $secs = number of seconds;
> > $hours = intval($secs/360);
> > $minutes = intval(($secs-$hours*360)/60)
> > $seconds = $secs - $hours*360 - $minutes * 60;
> >
> > Hope this helps.
> >
> > Michael Ridinger
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]