Stripping html

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
The TitleField in my DB reads:

Some title <span class=BoldRed>*</span>

This shows up correctly, with the asterisk in the correct format, when
shown on the web.

I also want to show this field without any of the formatting; i.e.

Some title *

I've tried:
$notags = stripslashes($row['title']);

and also

$notags = htmlspecialchars($row['title']);

but still get the tag info.  How can I get rid of it?

Re: Stripping html

Quoted text here. Click to load it

 If only there were some way to search the manual...

 The offical function listed there isn't perfect by any means, but it would
seem to fit your requirement above, at least.

Andy Hassall :: :: :: disk and FTP usage analysis tool

Re: Stripping html

Bob wrote:
Quoted text here. Click to load it

The function you're looking for is striptags().


Re: Stripping html

Christoph Burschka:

Quoted text here. Click to load it

    Although as Andy said, strip_tags() isn't perfect.


Site Timeline