in reply to Totaling a list of times

I'm not entirely sure what you're trying to do, but if you want to ensure that $total_hours contains the correct amount of hours, even if $total_minutes is greater than 60, try this:

$total_hours += int($total_minutes / 60); $total_minutes = $total_minutes % 60;

Is this what you wanted?

Replies are listed 'Best First'.
Re: Re: Totaling a list of times
by nlafferty (Scribe) on Oct 25, 2001 at 00:41 UTC
    I'm going to try it. Looks like what i need though. If i can combing the two like.
    $total_time = "$total_time:$total_minutes";
    and get the right total it should work fine. Thanks