public function dumpTree($html = true, $title = true) { $output = $title ? 'DUMP #' . pQuery::$dumpCount++ . " \n" : ''; $debug = pQuery::$debug; pQuery::$debug = false; foreach ($this->stack() as $node) { $output .= $this->__dumpTree($node); } pQuery::$debug = $debug; print $html ? nl2br(str_replace(' ', ' ', $output)) : $output; return $this; }