I need help designing a recursive function that does:
- Displays a multidimensional array recursively
- Must use bullet points e.g.
<ul>
and<li>
- Text must link to a document. For example text "1. Hi" will be redirected keeping its directory structure(Array Structure). But the text must be displayed recursively.
The array that will be the input will be a multidimensional array of directory hierarchy. Input:
Array
(
[pocketmine] => Array
(
[tutorial] => Array
(
[0] => 1. Introduction.markdown
[1] => part3-setting-up-your-workspace.php
[2] => part1-introduction.php~
[3] => part2-planning.php~
[4] => part2-planning.php
[5] => part5-pocketmine-says-hello-world.php
[6] => part4-inter-lingual-programming-basics.php
)
[documentation] => Array
(
[0] => List of Events Alphabetical.markdown
)
)
)
The output for the first one will be
- Pocketmine
- Tutorial
- 1.Introduction
- Tutorial
But "1. Introduction" must link to "whateverURL/pocketmine/tutorial/1.Introduction"
I need this to be displayed as(for example)
<ul>
<li><a href=pocketmine/tutorial/1.-Introduction.markdown>1. Introduction</li>
</ul>
Thanks for your help in advance.