|
Posted by CptDondo on 03/26/07 20:12
ZeldorBlat wrote:
> Instead of processing your files level by level, why not do it
> recursively? For instance, when your parse index.php, instead of
> adding clients.php, then inventory.php, and then going back and
> checking for their includes, add clients.php and check for his
> includes. When that's done, add inventory.php and check for his
> includes. That way you never need to insert the new array in the
> middle of the parent -- it'll just happen in the right order the first
> time.
>
Or store the info as XML and use XPath.... The first bit of work would
be harder, but then all the lookups and stuff would be there for you.
And you really don't have to care where the stuff is in the tree - just
look it up every time and add child nodes.
--Yan
Navigation:
[Reply to this message]
|