Re: text with html tags apeared in text area.
| From: | Miles Thompson | Date: | Fri, 28 Oct 2005 22:56:26 +0000 |
| Subject: | Re: text with html tags apeared in text area. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40560@lists.php.net to get a copy of this message | ||
At 07:03 PM 10/28/2005, Mohamed Yusuf wrote:
hi I have php form. one of my textarea gets data with html tags from database, so I would like to remove those html tags like <br />, therefore is there anyway that i can remove those tags in the data and then the data can appear as text in the textarea.Mohamed, PHP has a really rich set of string processing functions. Have a look at:
strip_tags(), see http://ca3.php.net/manual/en/function.strip-tags.phpYou may also want to look at:
htmlentities()
stripslashes()
addslashes()
It all depends, of course, on what you want to do with the content.
The <br /> - you retrieving XML?
Miles