Hi
Below is a typical example of an array of data that my system stores. The array contains two arrays of flight data for a single passenger (passenger id 9317 in this example)
Array
(
[16282] => Array
(
[id] => 16282
[bookingpassengerid] => 9317
[outflightnumber] => LY403
[outdepartdate] => 2012-04-18
[outdeparttime] => 12:15:00
[outarrivaltime] => 13:15:00
[outdepartfrom] => TLV
[outarriveto] => ETH
[indeparturedate] => 2012-04-22
[indeparturetime] => 09:30:00
[inarrivaltime] => 10:30:00
[indepartfrom] => ETH
[inarriveto] => TLV
[inflightnumber] => LY402
)
[16280] => Array
(
[id] => 16280
[bookingpassengerid] => 9317
[outflightnumber] => LY 318
[outdepartdate] => 2012-04-17
[outdeparttime] => 22:30:00
[outarrivaltime] => 05:20:00
[outdepartfrom] => LHR
[outarriveto] => TLV
[indeparturedate] => 2012-04-25
[indeparturetime] => 17:25:00
[inarrivaltime] => 20:50:00
[indepartfrom] => TLV
[inarriveto] => LHR
[inflightnumber] => LY317
)
)
I need to be able to order the output of the array so the [outdepartdate] value (and its other related key/value pairs) are displayed in date order.
So the outcome of re-ordering the data above would be that the:
[16280] [outdepartdate] => 2012-04-17
Would be displayed first along with all of the other key/value pairs from [16280] that begin with [out...
The plan is then to do the same but with the keys that begin with [in...
Is this possible?
Thanks for reading.