I pay promptly though paypal. Only Paypal at the moment. I need a PHP function. This is not hard but you have to pay attention to details That function will get a list of domains as input. For example: example.com example.example.com example2.example.com example.test.com That function will output a valid json to be used in a collapsable tree: https://observablehq.com/@d3/collapsible-tree?collection=@d3/d3-hierarchy Not all the domains are give, some are implied. For example: example.test.com implies test.com test.com implies com The collapsable tree json for the example will look like this: { "name": "com", "children": [{ "name": "test.com", "children": [{ "name": "example.test.com" }] }, { "name": "example.com", "children": [{ "name": "example.example.com" }, { "name": "example2.example.com" } ] } ] }