|
Posted by Jim Michaels on 11/21/05 11:37
this should work with xhtml also.
$content = preg_replace("m#</?[aA](\s[^\>]*|)>#","",$content);
"Lόpher Cypher" <lupher.cypher@verizon.net> wrote in message
news:9wBuf.5470$i%4.3574@trndny08...
> Bruno wrote:
>> Hi there,
>>
>> I want to strip any urls from a page and show the page without those
>> links. My solution is sort of lenghly. Looking for a nice and smart
>> solution. Any ideas?
>>
>
> I'd use preg_replace, something like
>
> $content = preg_replace("/<[aA]\s+.*>/","",$content);
> $content = preg_replace("/</[aA]>/","",$content);
>
>
>
>
> --
>
> - lόpher
> ---------------------------------------------
> "Man sieht nur das, was man weiί" (Goethe)
Navigation:
[Reply to this message]
|