Re: What's the best way to extract HTML out of $var?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/15 alexus <alexus@xxxxxxxxx>:
> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux