You are here: Re: strip URL's « PHP Language « IT news, forums, messages
Re: strip URL's

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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация