public function output($message, $depth = 0) {
        $samedepth = true;
        while ($this->currentdepth > $depth) {
            echo "</li>\n</ul>\n";
            $this->currentdepth -= 1;
            if ($this->currentdepth == $depth) {
                echo '<li>';
            }
            $samedepth = false;
        }
        while ($this->currentdepth < $depth) {
            echo "<ul>\n<li>";
            $this->currentdepth += 1;
            $samedepth = false;
        }
        if ($samedepth) {
            echo "</li>\n<li>";
        }
        echo htmlspecialchars($message);
        flush();
    }
public function output($message, $depth = 0) {
        $samedepth = true;
        while ($this->currentdepth > $depth) {
            echo "</li>\n</ul>\n";
            $this->currentdepth -= 1;
            if ($this->currentdepth == $depth) {
                echo '<li>';
            }
            $samedepth = false;
        }
        while ($this->currentdepth < $depth) {
            echo "<ul>\n<li>";
            $this->currentdepth += 1;
            $samedepth = false;
        }
        if ($samedepth) {
            echo "</li>\n<li>";
        }
        echo htmlspecialchars($message);
        flush();
    }
public function output ( $ message , $ depth = 0 ) { $ samedepth = true ; while ( $ this -> currentdepth > $ depth ) { echo "</li>\n</ul>\n" ; $ this -> currentdepth -= 1 ; if ( $ this -> currentdepth == $ depth ) { echo '<li>' ; } $ samedepth = false ; } while ( $ this -> currentdepth < $ depth ) { echo "<ul>\n<li>" ; $ this -> currentdepth += 1 ; $ samedepth = false ; } if ( $ samedepth ) { echo "</li>\n<li>" ; } echo htmlspecialchars ( $ message ) ; flush ( ) ; }
Echo out the list

@param string $message The message to display
@param int $depth
@return void Output is echoed
Echo out the list