tags:

views:

58

answers:

2

Hi,

I have a problem, i'd like to remove the containing array (key 80) but keep its children (with all the keys and structure unchanged, apart from the parent).

Can somebody help me

Array
(
    [80] => Array
        (
            [parent] => 0
            [lng] => en
            [children] => Array
                (
                    [98] => Array
                        (
                            [children] => Array
                                (
                                    [54] => Array
                                        (
                                            [parent] => 98
                                            [lng] => en
                                        )

                                )

                            [parent] => 80
                            [lng] => en
                        )

                )

        )

)

Thank you, BR

+1  A: 

Sounds like all you need is

$children = $all[80];
VolkerK
A: 

If you do:

$array=$array[80];

you preserve the children and remove the parent

mck89