\n");
foreach($table as $row)
{
if (substr($row[0],0,4) !== 'link' && substr($row[0],0,2) !== '//') //don't read the header line or the comments
{
assign(); //get the named and reassigned variables
if ($linktext == "--")
{
// print ("\n
");
print ("\n
"); // this trick allows a return to the top level from two levels down
}
else
{
$endul = ($level < $levelwas ? "\n\n" : ""); // if current < previous, we've moved up a level so finish this sub list before writing the next list item
$spawn = ($has_child == 1 ? "\n
" : ""); // if there's a child, start next sub list before printing list item
print ("\n".$endul."