2

I need to group this array according to proposal_num, the array with same proposal number will lies in the same row. How can i do this.. the array structure and other details are below.

Array
(
  [0] => Array
    (
        [proposal_num] => SimpleXMLElement Object
            (
                [0] => 1
            )

        [date_departure] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_departure] => SimpleXMLElement Object
            (
                [0] => 0713
            )

        [date_arrival] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_arrival] => SimpleXMLElement Object
            (
                [0] => 0845
            )

        [departure] => SimpleXMLElement Object
            (
                [0] => ATL
            )

        [depart_terminal] => SimpleXMLElement Object
            (
                [0] => N
            )

        [arrival] => SimpleXMLElement Object
            (
                [0] => BWI
            )

        [marketing_cmpny] => SimpleXMLElement Object
            (
                [0] => NK
            )

        [operating_cmpny] => SimpleXMLElement Object
            (
                [0] => NK
            )

        [flight_number] => SimpleXMLElement Object
            (
                [0] => 824
            )

        [equipment_type] => SimpleXMLElement Object
            (
                [0] => 319
            )

        [total_fare] => SimpleXMLElement Object
            (
                [0] => 326.20
            )

        [total_tax] => SimpleXMLElement Object
            (
                [0] => 49.00
            )

    )

[1] => Array
    (
        [proposal_num] => SimpleXMLElement Object
            (
                [0] => 2
            )

        [date_departure] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_departure] => SimpleXMLElement Object
            (
                [0] => 1535
            )

        [date_arrival] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_arrival] => SimpleXMLElement Object
            (
                [0] => 1702
            )

        [departure] => SimpleXMLElement Object
            (
                [0] => ATL
            )

        [depart_terminal] => SimpleXMLElement Object
            (
                [0] => N
            )

        [arrival] => SimpleXMLElement Object
            (
                [0] => CLT
            )

        [marketing_cmpny] => SimpleXMLElement Object
            (
                [0] => AA
            )

        [operating_cmpny] => SimpleXMLElement Object
            (
                [0] => US
            )

        [flight_number] => SimpleXMLElement Object
            (
                [0] => 1711
            )

        [equipment_type] => SimpleXMLElement Object
            (
                [0] => 321
            )

        [total_fare] => SimpleXMLElement Object
            (
                [0] => 430.20
            )

        [total_tax] => SimpleXMLElement Object
            (
                [0] => 69.28
            )

    )

[2] => Array
    (
        [proposal_num] => SimpleXMLElement Object
            (
                [0] => 2
            )

        [date_departure] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_departure] => SimpleXMLElement Object
            (
                [0] => 1740
            )

        [date_arrival] => SimpleXMLElement Object
            (
                [0] => 150715
            )

        [time_arrival] => SimpleXMLElement Object
            (
                [0] => 1903
            )

        [departure] => SimpleXMLElement Object
            (
                [0] => CLT
            )


        [arrival] => SimpleXMLElement Object
            (
                [0] => BWI
            )


        [marketing_cmpny] => SimpleXMLElement Object
            (
                [0] => AA
            )

        [operating_cmpny] => SimpleXMLElement Object
            (
                [0] => US
            )
        [flight_number] => SimpleXMLElement Object
            (
                [0] => 703
            )

        [equipment_type] => SimpleXMLElement Object
            (
                [0] => 321
            )

        [total_fare] => SimpleXMLElement Object
            (
                [0] => 430.20
            )

        [total_tax] => SimpleXMLElement Object
            (
                [0] => 69.28
            )

    )
)

i wanted to group this array according to proposal number.

i need output like..


Airline         Stops           Departs             Arrives         Duraton         Price

  NK            ATL→BWI         15/07/15 07:13     15/07/15 08:45   1hr 32m         $326.20

  US            ATL→CLT         15/07/15 15:35     15/07/15 17:02   1hr 27m         $430.20
  US            CLT→BWI         15/07/15 17:40     15/07/15 19:03   1hr 23m     

please help me to solve this .. thanks in advance

Arif K
  • 9
  • 2

0 Answers0