I have seen many PHP function on how to generate a
tag but my array input is quite complicated I guess. It is an array returned from a cust
Here is a quick PHP implementation for your array structure to get you started:
function create_html_list($nodes)
{
echo '';
foreach ($nodes as $node) {
$childNodes = $node['value'];
$titleNode = array_shift($childNodes);
echo "- ", $titleNode['value'];
if (count($childNodes) > 0) {
create_html_list($childNodes);
}
echo "
";
}
echo '
';
}