public function html2text($html, $advanced = false)
    {
        if ($advanced) {
            require_once 'extras/class.html2text.php';
            $htmlconverter = new html2text($html);
            return $htmlconverter->get_text();
        }
        return html_entity_decode(
            trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))),
            ENT_QUOTES,
            $this->CharSet
        );
    }
public function html2text($html, $advanced = false)
    {
        if ($advanced) {
            require_once 'extras/class.html2text.php';
            $htmlconverter = new html2text($html);
            return $htmlconverter->get_text();
        }
        return html_entity_decode(
            trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))),
            ENT_QUOTES,
            $this->CharSet
        );
    }
public function html2text ( $ html , $ advanced = false ) { if ( $ advanced ) { require_once 'extras/class.html2text.php' ; $ htmlconverter = new html2text ( $ html ) ; return $ htmlconverter -> get_text ( ) ; } return html_entity_decode ( trim ( strip_tags ( preg_replace ( '/<(head|title|style|script)[^>]*>.*?<\/\\1>/si' , '' , $ html ) ) ) , ENT_QUOTES , $ this -> CharSet ) ; }
Convert an HTML string into plain text.
@param string $html The HTML text to convert
@param boolean $advanced Should this use the more complex html2text converter or just a simple one?
@return string
Convert an HTML string into plain text .