I am getting page html code. 

I could remove all html tag and script. Also wanted to remove `<title> whatever here </html>`

Tested all solutions on SO. No help

What's wrong here?

```
function plaintext($html)
    {
        $plaintext = preg_replace('#([<]title)(.*)([<]/title[>])#', ' ', $html);

            //$plaintext = preg_match('#<title>(.*?)</title>#', $html);

        // remove comments and any content found in the the comment area (strip_tags only removes the actual tags).
        $plaintext = preg_replace('#<!--.*?-->#s', '', $plaintext);

        // put a space between list items (strip_tags just removes the tags).
            $plaintext = preg_replace('#</li>#', ' </li>', $plaintext);     

            // remove all script and style tags
        $plaintext = preg_replace('#<(script|style)\b[^>]*>(.*?)</(script|style)>#is', "", $plaintext);

        // remove br tags (missed by strip_tags)
            $plaintext = preg_replace("#<br[^>]*?>#", " ", $plaintext);

            // remove all remaining html
            $plaintext = strip_tags($plaintext);

        return $plaintext;
    }

```