Hi All
I have the following typical array structure (below) which briefly explained is as follows:
[2014] = the year
[2014][08] == the numerical month of the year
What I need is to be able to sort this array in order of the numerical month key (from Jan to Dec etc) but to maintain all keys within the array. I have looked at usort where you need to write an accompyaning function but I am a bit lost as to what to do with this function (if that is the right way to go ).
Array
(
[2014] => Array
(
[08] => Array
(
[NotProtected] => Array
(
[pax] => 6
[cost] => 2529
)
[Protected] => Array
(
[pax] => 1
[cost] => 648
)
)
[06] => Array
(
[NotProtected] => Array
(
[pax] => 7
[cost] => 3240
)
)
[07] => Array
(
[NotProtected] => Array
(
[pax] => 7
[cost] => 1926
)
)
[05] => Array
(
[NotProtected] => Array
(
[pax] => 5
[cost] => 1248
)
)
[09] => Array
(
[NotProtected] => Array
(
[pax] => 4
[cost] => 837
)
)
)
)
Many thanks for reading and any advice offered.