Developed by Arthur Borisow, listed in Algorithm
Walker can be used to convert an array into hierarchic data. It can traverse an array of elements which may be objects or arrays that have entries that define an identifier of the entry and the identifier of the parent entry.
The script calls a certain class function to process entries grouped by parent entry identifier. That function returns a string that is concatenated to form the whole hierarchy string representation. Sub-classes my redefine the entry processing function to generate a string in a hierarchic format.
Requirement: PHP 5.0 or higher