How do I work out the average time from an array of times.
I have an array that looks like this :
(\'17:29:53\',\'16:00:32\')
And I
$times = array('17:29:53','16:00:32'); $totaltime = ''; foreach($times as $time){ $timestamp = strtotime($time); $totaltime += $timestamp; } $average_time = ($totaltime/count($times)); echo date('H:i:s',$average_time);