Re: Removing HTML codes using regexp
| From: | Simon Garner | Date: | Sun, 25 Feb 2001 22:56:35 +0000 |
| Subject: | Re: Removing HTML codes using regexp | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41609@lists.php.net to get a copy of this message | ||
From: "Toke Herkild" <toke@herkild.dk>
> What if I want to replace all html codes from a string ?
> I've tried using :
>
> $myString = preg_replace('/<*>/, '', $myString);
> but that deletes all string... ( or everything from first '<' ) ...
>
> Toke Herkild...
>
>
Try striptags()
http://php.net/striptags
Cheers
Simon Garner