Search code examples
mlm

Php binary Tree In Mlm Software


Iam developing Mlm Software in Procedural Php-7,Now Strucked With Generation Of Bianary Tree (Parent,Left And Right Children Nodes).So Please Help Me, I Have An Admin With Username 10000 So Admin May Add New Users And Every User Can Add Many Sub Users So That I Need To Construct genealogy Tree . I Have Database Table Structre Like This [Table Structure]

And I need To Generate Tree Like This


Solution

  • If you were using LARAVEL there's a package you can use.

    https://github.com/lazychaser/laravel-nestedset

    And a video to describe the use

    https://youtu.be/9PEjGW2EvRI

    I'm also building an mlm site the problem I have is how to visualize the binary tree