Skip to content

kvelaro/tree-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

TreeHelper

Static class used to build tree of parent-child relations

install:

composer require kvelaro/tree-helper

ex:

TreeHelper::makeTree($rows, 'id', 'parent_id'); //build tree
$tree = TreeHelper::getTree(); //get tree
$root = null;
TreeHelper::iterateDS($root, null, function(&$node, $parentNode) {
    ...
} //iterate through items (Depth-Search)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages