Just wondering if anyone can help me, I have a multi-dimensional array which contains a string which identifies its relationship with other items as part of a navigation structure.
For example 1, 2, 3, 4 would be top level items and 1-1, 2-1, 3-1, 4-1 would be the second level relating to the top level and finally there is 1-1-1, 2-1-1, 3-1-1 and so on.
Basically I am trying to rewrite the array so that I can easily work out relationships by using a string length pre-filter.
I had thought about organising my array in a number of dimensions like this:
1
1-1
1-1-1
2
2-1
2-1-1
From a flat array how could I acheive this easily???