Hi all, I backed myself into a corner and cold use a little help. I have a multi-dimensional array that has a know number of elements at the deepest level but the number of levels is unknown. Here is a brief example:
$menuarray[5][0] = "5" $menuarray[5][1] = "Sales" $menuarray[5][2] = "" $menuarray[5][3] = "20" $menuarray[5][4] = "90" $menuarray[5][5] = "0" $menuarray[5][6] = "" $menuarray[5][7] = "5" $menuarray[7][1][0] = "11" $menuarray[7][1][1] = "Home" $menuarray[7][1][2] = "" $menuarray[7][1][3] = "20" $menuarray[7][1][4] = "160" $menuarray[7][1][5] = "7" $menuarray[7][1][6] = "" $menuarray[7][1][7] = "1" $menuarray[7][5][5][0] = "20" $menuarray[7][5][5][1] = "Edit Call Schedule" $menuarray[7][5][5][2] = "" $menuarray[7][5][5][3] = "20" $menuarray[7][5][5][4] = "160" $menuarray[7][5][5][5] = "15" $menuarray[7][5][5][6] = "" $menuarray[7][5][5][7] = "5" $menuarray[7][5][3][1][0] = "21" $menuarray[7][5][3][1][1] = "Assets" $menuarray[7][5][3][1][2] = "" $menuarray[7][5][3][1][3] = "20" $menuarray[7][5][3][1][4] = "160" $menuarray[7][5][3][1][5] = "18" $menuarray[7][5][3][1][6] = "" $menuarray[7][5][3][1][7] = "1" I need to be able to iterate over the entire array in order so that the sublevels are shown immediately after the preceding level. I know there must be a simple way of doing this but I just can't seem to make it work. I do know how to do: for $x(0..$#menuarray) { for $y(0..$#{$menuarray[$x]}) { ..... } } But that isn't going to work since I don't know how deep the array goes and that the number of sub levels may differ from one element to the next. Any help or hints will be greatly appreciated. Thanks, Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]