I have the following array:

Array (
        [0] => Array
            (
                [ID] => 5698155015
                [Name] => MyName2
                [Children] => Array
                    (
                        [0] => Array
                            (
                                [ID] => 5698160015
                                [Name] => MyName2
                            )

                        [1] => Array
                            (
                                [ID] => 5698161015
                                [Name] => MyName1
                            )

                        [2] => Array
                            (
                                [ID] => 5698162015
                                [Name] => MyName3
                            )

                    )

            )

        [1] => Array
            (
                [ID] => 5698159015
                [Name] => MyName1
                [Children] => Array
                    (
                        [0] => Array
                            (
                                [ID] => 5698223015
                                [Name] => MyName1
                                [Children] => Array
                                    (
                                        [0] => Array
                                            (
                                                [ID] => 5698225015
                                                [Name] => MyName2
                                            )

                                        [1] => Array
                                            (
                                                [ID] => 5698226015
                                                [Name] => MyName1
                                            )

                                    )

                            )

                        [1] => Array
                            (
                                [ID] => 5698224015
                                [Name] => MyName2
                            )

                    )

            )

    )

I want to sort this array alphabetically at all 3 levels by "name" value, how to do that with array_multisort? Any other ideas?

MyName1 { Children: MyName1, MyName2, MyName3 }, MyName2 { Children: MyName3 }, MyName3 { Children: MyName1, MyName3 } ...

share|improve this question
4  
Have you tried any of the gazillion similar questions from the sidebar? If so, what exactly are you having a problem with? Share with us what you have tried so we don't have to unnecessarily repeat ourselves and give you a fitting answer. – deceze 13 hours ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.