PHP average time from an array

后端 未结 4 506
逝去的感伤
逝去的感伤 2021-01-18 18:48

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

4条回答
  •  無奈伤痛
    2021-01-18 19:25

    • convert both using strtotime() function
    • add the value
    • divide by 2 (or how many items there in your array)
    • convert back to normal time format

提交回复
热议问题