I have an array that outputs data that looks like this:
[STU-CZC0226PVC] => Array
(
[ComputerName] => STU-CZC0226PVC
[time_in_days] => 13
[room] => 1N10
)
[STU-FMDXZDHJF-M] => Array
(
[ComputerName] => STU-FMDXZDHJF-M
[time_in_days] => 13
[room] => 2R022
)
[STU-CZC03184CM] => Array
(
[ComputerName] => STU-CZC03184CM
[time_in_days] => 13
[room] => 2Q11
)
[STU-CZC0226PTM] => Array
(
[ComputerName] => STU-CZC0226PTM
[time_in_days] => 13
[room] => 1N10
)
[STU-CZC12632SN] => Array
(
[ComputerName] => STU-CZC12632SN
[time_in_days] => 13
[room] => 1N75
I would like to sort the array so that the records with the same room number are listed together, but don't have a clue how to do it. I think it might use usort(), but I can't work out how to implement that, and was wondering if anyone could help?
Thanks