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
Populating Data into textArea - shows HTML
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Populating Data into textArea - shows HTML
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.
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
there was just one question...
strip_tags did the trick
thank you
strip_tags did the trick
thank you