Re: to remove html tags from a string.
| From: | Philip Olson | Date: | Fri, 05 Jul 2002 16:44:48 +0000 |
| Subject: | Re: to remove html tags from a string. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105685@lists.php.net to get a copy of this message | ||
See http://www.php.net/strip_tags
On Fri, 5 Jul 2002, Anil Garg wrote:
> Hi,
> How to do whats written in the commented line(//) in the code below:
>
> <?php
> $term = ".<B>test</b>";
> if(stristr($term,"<") && stristr($term,">") &&
> !stristr($term,"<br>") &&
> !stristr($term,"<p>") ){
> printf("its html tag");
> // here i want to remove the html tags from $term and then print
> it.(here it should print '.test')
> }
> else{
> printf("not a html tag.");
> }
> ?>
> Thanx and regards
> anil
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>