How can I add a given number of time in PHP?
Below is are three time variables I would like to add:
time1: "00:02:00"
time2: "00:15:00"
time3: "00:08:00"
This was my approach in attempting to achieve that:
echo date('h:i:s', strtotime('00:02:00') + strtotime('00:15:00') + strtotime('00:08:00'));
The result of my code is 12:25:00, while the expected result should have been 00:25:00.
What am I doing wrong and how can I add given time variables effectively in PHP?