Pointless Dribble
Bu benden başka garip biridir, tamam, benim son soru ... korkak dizi manipülasyon aynı bu tür fırsatlar bana yardım için OIS teşekkür etmek istiyorum ... i derinlemesine bu kodu okudu ve ben bana özyinelemeli dizi manipülatif fonksiyonları ile daha iyi hale yardımcı oldu hissediyorum. Ancak, yine ben başka bir zor bir noktada benim öz bulmak
Actual Problem
I am trying to write a recursive manipulative function such as this. Except for getting the depth of each array element. It will add incremental count to each array element with a certain depth. The easiest way to see what I'm trying to do is to view the "sample array" and "Desired result Array"... i feel like I'm getting better at understanding these kind of recursive functions. but this one is giving me hell, thanks in advance for any kind of help you can give me with this.
Please disregard the [depth] result of the sample array i already have a function that adds this.
Thanks again,
-- YouDontMeanMuch
Sample Array
array (
52 =>
array (
'title' => 'Website Navigation',
'path' => '',
'type' => '115',
'pid' => 0,
'hasChildren' => 1,
'children' =>
array (
53 =>
array (
'title' => 'Home',
'path' => '',
'type' => '118',
'pid' => 52,
'hasChildren' => 0,
),
54 =>
array (
'title' => 'Features',
'path' => 'features',
'type' => '374',
'pid' => 52,
'hasChildren' => 1,
'children' =>
array (
59 =>
array (
'title' => 'artistic',
'path' => 'features/artistic',
'type' => '374',
'pid' => 54,
'hasChildren' => 1,
'children' =>
array (
63 =>
array (
'title' => 'galleries',
'path' => 'features/artistic/galleries',
'type' => '374',
'pid' => 59,
'hasChildren' => 1,
'children' =>
array (
65 =>
array (
'title' => 'graphics',
'path' => 'features/artistic/galleries/graphics',
'type' => '118',
'pid' => 63,
'hasChildren' => 0,
),
67 =>
array (
'title' => 'mixed medium',
'path' => 'features/artistic/galleries/mixed-medium',
'type' => '118',
'pid' => 63,
'hasChildren' => 0,
),
64 =>
array (
'title' => 'overview',
'path' => 'features/artistic/galleries',
'type' => '118',
'pid' => 63,
'hasChildren' => 0,
),
68 =>
array (
'title' => 'photography',
'path' => 'features/artistic/galleries/photography',
'type' => '118',
'pid' => 63,
'hasCh