¡@

Home 

php Programming Glossary: olditem

How to create an array from this result set (nested categories stored in databased with traversal model)?

http://stackoverflow.com/questions/3668702/how-to-create-an-array-from-this-result-set-nested-categories-stored-in-databas

path structure for depths path array create 'root' node olditem array 'children' result foreach tree as item if item 'depth'.. item 'depth' make sure we have an array entry if isset olditem 'children' olditem 'children' array acquire target path item.. sure we have an array entry if isset olditem 'children' olditem 'children' array acquire target path item 'depth' olditem 'children'..