Re: detecting HTML tags
| From: | Christian Reiniger | Date: | Tue, 15 May 2001 16:14:02 +0000 |
| Subject: | Re: detecting HTML tags | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52881@lists.php.net to get a copy of this message | ||
On Tuesday 15 May 2001 16:39, bill wrote:
> Is there a way to detect the presence of HTML tags?
>
> I don't want them stripped out, I just want to know if a string
> contains them.
>
> I'm rolling my own mailing program and want it to detect the HTML if
> present and send it appropriately.
if (strstr ($text, '<')) {
UseHTML ($text);
} else {
UsePlaintext ($text);
}
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."
- Isaac Asimov