{code snipped}
You could probably simplify this a bit with mktime(). The syntax is
mktime(hours, minutes, seconds):
$minsec = explode(":", $time);
$numsecs += mktime(0, $minsec[0], $minsec[1]);
That'll give you the number of seconds. Then at the end, you can say:
echo(floor($totalseconds / 60) . " minutes.");
to get the total number of minutes. Use ceil() instead of floor() if you
want to round up instead of down, or just echo((int)$totalseconds); to round
to the nearest integer.
Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email
--
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]