Jump to content

[SOLVED] Sort/Re-arranging a Multidimension Array


albertdumb

Recommended Posts

Hi all, i need help to rearrange a multidimensional array. I have an array like this:>

 

Array

(

    [1] => Array

        (

            [dep_airport] => ACE

            [arr_airport] => BHX

        )

 

    [2] => Array

        (

            [dep_airport] => ACE

            [arr_airport] => LGW

        )

 

Now i want to sort this array into a new array so that, if a dep_airport has the same value - list all the arr_airport as a value and dep_airport as a key like so:

 

array(

        [ACE] => Array

                    (

                      [0]=>BHX

                      [1]=>LGW

)

 

Can someone please help???

 

Cheers

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.