Posted by gosha bine on 04/20/07 08:24
On 20.04.2007 00:11 Jon Slaughter wrote:
> I wrote some code to read in a file
>
> and I'm curious as to is this is a decent way to do it or if there is a much
> more elegant way. Essentially I want to convert a text file that into a ul
> in html for my nav menu. This way I can easily add and remove links without
> messing with any other code(Except of course where the link points to).
>
> Anyways, the code works as far as getting the links into a multi-array that
> I can work with but not sure if its the best way or not.
Your code looks ok to me, however it won't work with deeply nested
structures. Perhaps more scalable would be to store data in XML format.
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
[Back to original message]
|