Hey,
i have have got an array of the complexe sort to store my navigation (which is supposed to be changed by the user afterwards). I do not want to have the script only work with 3 levels of depth so I am looking for a nice and good way to sort this array by the position field.
$nav[1]=array(
'name'=>'home',
'position'=>'2',
children=>array(
[1]=array(
'name'=>'page2',
position=>'3'),
[2]=array(
'name'=>'page3',
'position'=>'1'),
[3]=array(
'name'=>'page4',
'position'=>'2')
)
$nav[2]=array(
'name'=>'Second level 1',
'position'=>'1'
);
I hope someone can help me, thanks for thinking about the problem.