I was surprised not to find an answer to this on SO (or elsewhere on the internet for that matter). It concerns a nested indented list which I want to convert into a multidi
There is a class on PHP Scripts that will do what you need. You can find it here: Array To List
It takes a multidimensional array and creates the HTML.
Updated
The opposite to this was actually required. To do this, it's probably best to use a DOMDocument object and load the HTML into a object representation.
http://php.net/manual/en/domdocument.loadhtml.php