Fahrvergnuugen
I am the law!
Alright, its a bit more complex than just looping an array
Here's an array I have:
As you can see, its an array keyed by a numeric ID (which corresponds to a record in a DB) and its values are file paths.
I want to take that array and put it into an HTML list structure, like this:
The IDs are structured in the same manner as the file paths. It seems simple, until you try to actually do it.
Anybody have any brainy ideas?
Here's an array I have:
Code:
[28] => Jobs/
[29] => Jobs/GT-30074/
[30] => Jobs/GT-30074/Engineering/
[35] => Jobs/GT-30074/Marketing/
[36] => Jobs/GT-30074/Order Book/
[37] => Jobs/GT-30074/Service/
[79] => Jobs/TEST COPY/
[82] => Jobs/TEST COPY/Engineering/
[96] => Jobs/TEST COPY/Marketing/
[80] => Jobs/TEST COPY/Order Book/
[81] => Jobs/TEST COPY/Service/
I want to take that array and put it into an HTML list structure, like this:
Code:
<ul>
<li>28 jobs
<ul>
<li>29 GT-30074
<ul>
<li>30 Engineering
<li>35 Marketing
<li>36 Order Book
<li>37 Service
</ul>
</ul>
<ul>
<li>79 TEST COPY
<ul>
<li>82 Engineering
<li>96 Marketing
<li>80 Order Book
<li>81 Service
</ul>
</ul>
</ul>
The IDs are structured in the same manner as the file paths. It seems simple, until you try to actually do it.
Anybody have any brainy ideas?