Really and truthfully, if you believe you are completely comfortable at the level you're at, this problem tells me it's time for you to tackle object-oriented PHP. It would make this problem a non-problem, because each level would have methods defined to handle this kind of thing.
However, that won't help you anytime soon as it'll take a while to learn, so I'll focus on what you've got so far.
You have the right idea with a function which calls itself. But how would you display hierarchial data with HTML? With nested lists 
There are probably more efficient methods than below, but it's written so that you see what's going on:
PHP Code:
function makeNestedList(array $Array){
$Output = '<ul>';
foreach($Array as $Key => $Value){
$Output .= "<li><strong>{$Key}: </strong>";
if(is_array($Value)){
$Output .= makeNestedList($Value);
}else{
$Output .= $Value;
}
$Output .= '</li>';
}
$Output .= '</ul>';
return $Output;
}
$Data = array("Some Info" => array("A" => "a", "B" => array("B1" => "b1", "B2" => "b2"), "C" => array("C1" => array("C11" => "c11", "C12" => "c12", "C13" => array("C131" => "c131", "C132" => "c132")), "C2" => "c2")));
echo makeNestedList($Data);
Bookmarks