Re: What's the best way to extract HTML out of $var?
| From: | Bruno Fajardo | Date: | Fri, 15 Jan 2010 11:36:54 +0000 |
| Subject: | Re: What's the best way to extract HTML out of $var? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301132@lists.php.net to get a copy of this message | ||
2010/1/15 alexus <alexus@gmail.com>:
> What's the best way to extract HTML out of $var?
>
> example of $var
>
> $var = "<a
> href="http://http://stackoverflow.com/"Stack
> Overflow</a>"
> I want
>
> $var2 = "http://starckoverflow.com/"
> example: preg_match();
>
> what else?
Hi,
If you simply wants to remove all tags from the string, try using the
strip_tags function (http://php.net/strip_tags).
>
> --
> http://alexus.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php