I would like to extract the data groups from the PHP arrays depending on the "RouterName". So, in the end, I will get 4 Big Arrays (ArrDeviceA, ArrDeviceB, etc.)
I don't want to use foreach and loop every rows and put into the separate array. Moreover, there might be the chance that some arrays might contain more than 3 rows. The number of rows are not constant.
Is there any function to query the array in PHP?
The raw data of php array are as follow:
Array
(
[0] => Array
(
[RouterName] => DeviceA
[Reference] => R2a
[AverageRSSI] => -36.00
[AverageQuality] => 63.00
[Date_Time] => 12-June-2010
)
[1] => Array
(
[RouterName] => DeviceA
[Reference] => R2a
[AverageRSSI] => -51.03
[AverageQuality] => 47.97
[Date_Time] => 11-June-2010
)
[2] => Array
(
[RouterName] => DeviceA
[Reference] => R2a
[AverageRSSI] => -53.63
[AverageQuality] => 45.37
[Date_Time] => 10-June-2010
)
[3] => Array
(
[RouterName] => DeviceB
[Reference] => R2
[AverageRSSI] => -38.19
[AverageQuality] => 60.81
[Date_Time] => 12-June-2010
)
[4] => Array
(
[RouterName] => DeviceB
[Reference] => R2
[AverageRSSI] => -38.64
[AverageQuality] => 60.36
[Date_Time] => 11-June-2010
)
[5] => Array
(
[RouterName] => DeviceB
[Reference] => R2
[AverageRSSI] => -38.67
[AverageQuality] => 60.33
[Date_Time] => 10-June-2010
)
[6] => Array
(
[RouterName] => DeviceC
[Reference] => SCN1010
[AverageRSSI] => -69.12
[AverageQuality] => 29.88
[Date_Time] => 12-June-2010
)
[7] => Array
(
[RouterName] => DeviceC
[Reference] => SCN1010
[AverageRSSI] => -70.99
[AverageQuality] => 28.01
[Date_Time] => 11-June-2010
)
[8] => Array
(
[RouterName] => DeviceC
[Reference] => SCN1010
[AverageRSSI] => -71.52
[AverageQuality] => 27.48
[Date_Time] => 10-June-2010
)
[9] => Array
(
[RouterName] => DeviceD
[Reference] => SCN1020
[AverageRSSI] => -62.48
[AverageQuality] => 36.52
[Date_Time] => 12-June-2010
)
[10] => Array
(
[RouterName] => DeviceD
[Reference] => SCN1020
[AverageRSSI] => -34.60
[AverageQuality] => 64.40
[Date_Time] => 11-June-2010
)
[11] => Array
(
[RouterName] => DeviceD
[Reference] => SCN1020
[AverageRSSI] => 0.00
[AverageQuality] => 99.00
[Date_Time] => 10-June-2010
)
)