convert pure html to text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

convert pure html to text

Post by srdva59 »

Hello Everyone,

I have been searching tirelessly and cannot find a way to convert this
text into
html


text=
<p>LONDRES (Reuters) - Cientistas descobriram três importantes elos genéticos ligados ao mal de Alzheimer que afetam até 20% dos pacientes da doença e disseram neste domingo que foi a mais importante revelação na área nos últimos 15 anos
...</p><p><a href="http://oglobo.globo.com/ciencia/mat/200 ... t;>Leia mais</a></p>
<p><a href="https://seguro.oglobo.com.br/assinatura ... >Assine O GLOBO</a> e receba todo o conteúdo do jornal na sua casa</p>

i need do this using php the text is removed form a xml file them i need
process the text to a normal text
thanks for your help
:)
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: convert pure html to text

Post by Mark Baker »

take a look at htmlentities() and html_entity_decode()
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

Re: convert pure html to text

Post by srdva59 »

thanks
Post Reply