Not for the first time I’ve searched for a way to visualize a multidimensional array in a tree view in my web browser without directly using echo or print. I wasn’t able to find a concrete solution for this previously. However, this time I was put on the right track by a post of Kevin van Zonneveld. I’ve given it my own (quick and dirty as can be seen from the code) twist to get it to work. By just calling:
print implode(ArrayFunctions::toString($array));
The array is shown as a tree structure on the screen.
The implementation is as follows:
good stuff, thank you for posting.