I have done a lot of looking around the internet to find solution to my problem, but nothing has worked for my specific case.
I have an array of hours and active users as following:
Array (
[0] => Array (
[time] => 05:00 ,
[users] => 0
),
[1] => Array (
[time] => 06:00,
[users] => 0
),
[2] => Array (
[time] => 07:00,
[users] => 1
),
[3] => Array (
[time] => 07:00,
[users] => 3
)
[4] => Array (
[time] => 07:00,
[users] => 3
),
[5]=> Array (
[time] => 08:00,
[users] => 0
)
)
I'm trying to group all the values, where [time] is same and get an average of users for that time. So in this example, users for 07:00 would be 2,33, and rounded to 2.
I tried to be clear as possible and am hoping, that this makes some sense...