Re: html to plain text
I think htmlentities() is what you looking for:
http://hk.php.net/manual/en/function.htmlentities.php
Disco Octopus wrote:
Hi,
I would like to know if there is a function in php that takes a string
which is HTML, and returns a string that is all the text in the source
string without the HTML tags.
so, for example....
given a source string of this.....
<p>Hello <b>world</b>.</p>
<p>Goodbye <b>world</b>.</p>
I would like to have returned...
Hello world.
Goodbye world.
Does anybody know if this exists?
Thanks
.
Relevant Pages
- Re: getAttribute question
... oddity with IE that getAttributereturns an empty string if the ... HTML specification, ... appropriate places in the HTML 4 and DOM HTML specifications. ... (comp.lang.javascript) - Re: [PHP] generating an html intro text ...
... You would have to search out and pull in all closing tags. ... grab 256 characters -- The string. ... html markup should not go towards the string length count, ... (php.general) - [perl-python] 20050127 traverse a dir
... suppose you want to walk into a directory, say, to apply a string ... replacement to all html files. ... So, when ever myfun is called, we need to loop thru the ... # with a recursive "filter" ... (comp.lang.perl.misc) - [perl-python] 20050127 traverse a dir
... suppose you want to walk into a directory, say, to apply a string ... replacement to all html files. ... So, when ever myfun is called, we need to loop thru the ... # with a recursive "filter" ... (comp.lang.python) - Re: is there a way to take an html string and render it as a web browser would, from the command lin
... is there a way to take an html string and render it as a web ... browser would, from the command line? ... particular, image tags should print out as images, not image tags. ... (comp.lang.php) |
|