2

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

2 Answers 2

3

Sounds like all you need is

$children = $all[80]; 
Sign up to request clarification or add additional context in comments.

Comments

3

If you do:

$array=$array[80]; 

you preserve the children and remove the parent

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.