I have loaded the results of an SQL query into an array. The fields are ComputerName
, time_in_days
, room
, keyed on ComputerName
.
I would like to find out how many times each time_in_days
occurrence happens.
Example values of array are:
[STU-CZC1087SNC] => Array
(
[ComputerName] => STU-CZC1087SNC
[time_in_days] => 0
[room] => 4Q08
)
[STU-CZC02501QT] => Array
(
[ComputerName] => STU-CZC02501QT
[time_in_days] => 12
[room] => 2R017
)
So I want to know how many computers have time_in_days = 12
, and how many have time_in_days = 0
for example.
It will be used to plot a graph.
How do I do / what is the best way of doing this?