1. Go to this page and download the library: Download pwm/treegami library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pwm / treegami example snippets
$tree = new Tree(
'first', [ // node has 3 children
new Tree('second', [ // node has 2 children
new Tree('third'), // children are optional and defaults to []
new Tree(), // node value is optional and defaults to null
]),
new Tree('fourth', []), // explicitly saying no children
new Tree('fifth', [
new Tree(null, []) // explicitly saying no node value or children
]),
]
);