function get_html($tree = null) { $str = ''; foreach ($this->tree as $item) { if ('item' == $item['type']) { continue; } $str .= $item['str']; } $bb = new bbcode(); $bb->tags = $this->tags; $bb->mnemonics = $this->mnemonics; $bb->autolinks = $this->autolinks; $bb->parse($str); return '<code class="bb_code">' . $bb->highlight() . '</code>'; }