voci mon problème : je souhaite insérer dans bdd mysql des données en json

Etape 1/

Mon résultat Json

[{"title":"Account","customSelect":"1","select2ScrollPosition":{"x":0,"y":0},"id":1,"__domenu_params":{}},{"title":"Settings","customSelect":"3","select2ScrollPosition":{"x":0,"y":0},"id":2,"__domenu_params":{},"children":[{"title":"Call","customSelect":"4","id":3,"__domenu_params":{},"select2ScrollPosition":{"x":0,"y":0},"children":[{"title":"Support","customSelect":"3","id":4,"__domenu_params":{},"select2ScrollPosition":{"x":0,"y":0}},{"title":"Email","customSelect":"4","id":5,"__domenu_params":{},"select2ScrollPosition":{"x":0,"y":0}}]}]},{"title":"TOTO","customSelect":"3","id":6,"__domenu_params":{},"select2ScrollPosition":{"x":0,"y":0}},{"title":"Orders","customSelect":"select something...","id":7,"__domenu_params":{}},{"title":"Manage","customSelect":"select something...","id":8,"__domenu_params":{}},{"title":"tata","customSelect":"1","id":9,"__domenu_params":{},"select2ScrollPosition":{"x":0,"y":0}}]

Etape 2: Ensuite avec : $php_arr = json_decode($json,true);
echo "<pre>";

print_r($php_arr);

echo "</pre>";

j'obtient ceci :

Array
(
[0] => stdClass Object
(
Smiley title => Account
[customSelect] => 1
[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

Smiley id => 1
[__domenu_params] => stdClass Object
(
)

)

[1] => stdClass Object
(
Smiley title => Settings
[customSelect] => 3
[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

Smiley id => 2
[__domenu_params] => stdClass Object
(
)

Smiley children => Array
(
[0] => stdClass Object
(
Smiley title => Call
[customSelect] => 4
Smiley id => 3
[__domenu_params] => stdClass Object
(
)

[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

Smiley children => Array
(
[0] => stdClass Object
(
Smiley title => Support
[customSelect] => 3
Smiley id => 4
[__domenu_params] => stdClass Object
(
)

[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

)

[1] => stdClass Object
(
Smiley title => Email
[customSelect] => 4
Smiley id => 5
[__domenu_params] => stdClass Object
(
)

[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

)

)

)

)

)

[2] => stdClass Object
(
Smiley title => TOTO
[customSelect] => 3
Smiley id => 6
[__domenu_params] => stdClass Object
(
)

[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

)

[3] => stdClass Object
(
Smiley title => Orders
[customSelect] => select something...
Smiley id => 7
[__domenu_params] => stdClass Object
(
)

)

[4] => stdClass Object
(
Smiley title => Manage
[customSelect] => select something...
Smiley id => 8
[__domenu_params] => stdClass Object
(
)

)

[5] => stdClass Object
(
Smiley title => tata
[customSelect] => 1
Smiley id => 9
[__domenu_params] => stdClass Object
(
)

[select2ScrollPosition] => stdClass Object
(
[x] => 0
[y] => 0
)

)

)


il réaliser ce menu de la forme :

Account
.riton
Orders
.Email
.Support
.nouveau
Manage
.Settings
Settings
.TOTO
.Call
tonton


il faut une fonction récursive, mais je sais pas la faire... merci de votre aide!!!!