Page 1 of 1

Populating Data into textArea - shows HTML

Posted: Sat Oct 04, 2008 11:53 am
by arunkar
Hi guys,

When the data from the from the textArea is stored into the database in the "text" field. the paragaphs have <br /> in them.
When the data is populated into a textArea it has the <br/> tag in it. How do I remove it? is there a way to overcome this?

The data entered into the textArea
The future is not somewhere we are going. It is something we are creating. Every day we do things that make some futures more probable and others less likely.

Global warming already disrupts millions of lives daily in the forms of destructive weather patterns and loss of habitat.


The data populated into the textArea
The future is not somewhere we are going. It is something we are creating. Every day we do things that make some futures more probable and others less likely.<br />
<br />
Global warming already disrupts millions of lives daily in the forms of destructive weather patterns and loss of habitat.<br />
<br />



How do I display with the HTML tags? any ideas ppl?

thanks

Re: Populating Data into textArea - shows HTML

Posted: Sat Oct 04, 2008 1:10 pm
by jaoudestudios
Are there 2 questions or have you contridicted yourself?

To remove html tags use strip_tags and to put <br> or <br /> back in from line breaks in the textarea using nl2br.

Re: Populating Data into textArea - shows HTML

Posted: Sat Oct 04, 2008 9:10 pm
by arunkar
there was just one question...

strip_tags did the trick

thank you