Given a series of hours, minutes, and seconds (ex: 01:30:00 or 00:30:00), I would like to add up each and convert the sum to seconds.
For example, if the total time
Try this:
$string = "1:30:20"; $components = explode(":", $string); $seconds = $components[0]*60*60 + $components[1]*60 + $components[2]