public function html($plain, $nice = false)
    {
        $paragraphs = explode("\n\n", trim($plain));

        $html = '';

        if (count($paragraphs) == 1) {
            return nl2br(trim($paragraphs[0]));
        }

        foreach ($paragraphs as $paragraph) {
            $html .= '<p>'.nl2br(trim($paragraph)).'</p>';
        }

        return $html;
    }
public function html($plain, $nice = false)
    {
        $paragraphs = explode("\n\n", trim($plain));

        $html = '';

        if (count($paragraphs) == 1) {
            return nl2br(trim($paragraphs[0]));
        }

        foreach ($paragraphs as $paragraph) {
            $html .= '<p>'.nl2br(trim($paragraph)).'</p>';
        }

        return $html;
    }
public function html ( $ plain , $ nice = false ) { $ paragraphs = explode ( "\n\n" , trim ( $ plain ) ) ; $ html = '' ; if ( count ( $ paragraphs ) == 1 ) { return nl2br ( trim ( $ paragraphs [ 0 ] ) ) ; } foreach ( $ paragraphs as $ paragraph ) { $ html .= '<p>' . nl2br ( trim ( $ paragraph ) ) . '</p>' ; } return $ html ; }
Converts plain to html text.

@param string      $plain
@param string|bool $nice  (optional)

@return string
Converts plain to html text .