On Tuesday 15 May 2001 18:25, Jack Dempsey wrote:
> $text = " 50 < 100 + 240";
> not html...
>
> would want regex's i would think, or the striptags  version someone
> sent before...

Well, then preg_match ('/<[a-z]/i', $text) should work.


> > > Is there a way to detect the presence of HTML tags?

> > > 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to