PHP function Get_Array_Keys_UL will create an nested HTML Unordered List string of the keys of a given array. Makes best sense with literal keys, e.g. $_POST:
/**
* Creates recursively a nested HTML UL of array keys.
* @param array $array Array
* @return string Nested UL string
*/
function Get_Array_Keys_UL($array=array()) {
$recursion=__FUNCTION__;
if (empty($array)) return '';
$out=''."\n";
'."\n";
foreach ($array as $key => $elem)
$out .= '- '.$key.$recursion($elem).'
'."\n";
$out .= '
return $out;
}
Found here