I have just made the update/add/delete part for the \"Closure table\" way of organizing query hierarchical data that are shown on page 70 in this slideshare: http://www.slid
When you want the output as a unordered list you can change the outputCategories method as follows (based on ftrotters arrays in arrays):
public function outputCategories($categories, $startingLevel = 0)
{
echo "\n";
foreach ($categories as $key => $category)
{
if (count($category['children']) > 0)
{
echo "- {$category['name']}\n";
$this->outputCategories($category['children'], $startingLevel+1);
echo "
\n";
}
else
{
echo "- {$category['name']}
\n";
}
}
echo "
\n";
}