Re: PHP methods of striping tags and tag contents
| From: | Burhan Khalid | Date: | Fri, 16 May 2003 21:11:08 +0000 |
| Subject: | Re: PHP methods of striping tags and tag contents | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147976@lists.php.net to get a copy of this message | ||
Hello dwalker,
Thursday, April 24, 2003, 11:50:16 PM, you wrote:
Firstly, don't ask for reading confirmation reciepts -- especially on
a list.
d> What is the most efficient method of removing tags AND the contents between the tags?
$results =
preg_replace("@<(tag|tag2)(.*?)>.*?</(tag|tag2)>@sm","",$html);
were tag|tag2 is the list of tags you want to search for.
--
Best regards,
Burhan