Philip Seeger
Jul 11 2005, 06:12 PM
Hi everybody.
Can anybody tell me how I can take all hyperlinks out of a string?
Example: I have a string like this: 'blah blah bubble <a
href="http://www.google.com/">googling's funny</a> bubble blah'.
And it should transformed to 'blah blah bubble googling's funny bubble
blah'.
Thanx already!
--
Philip Seeger
Hilarion
Jul 11 2005, 07:14 PM
Philip Seeger wrote:
QUOTE |
Can anybody tell me how I can take all hyperlinks out of a string?
|
You can try experimenting with "strip_tags" function.
Hilarion
Phil
Jul 11 2005, 07:49 PM
Philip Seeger wrote:
QUOTE |
Hi everybody.
Can anybody tell me how I can take all hyperlinks out of a string? Example: I have a string like this: 'blah blah bubble <a href="http://www.google.com/">googling's funny</a> bubble blah'. And it should transformed to 'blah blah bubble googling's funny bubble blah'.
|
strip_tags()
Philip Seeger
Jul 12 2005, 10:15 AM
That works, thank you very much!
Philip
"Hilarion" <[Email Removed]> schrieb im Newsbeitrag
news:dauk1k$sb$[Email Removed]...
QUOTE |
Philip Seeger wrote: Can anybody tell me how I can take all hyperlinks out of a string?
You can try experimenting with "strip_tags" function.
Hilarion
|
Stefan Rybacki
Jul 13 2005, 08:11 AM
Phil wrote:
QUOTE |
Philip Seeger wrote:
Hi everybody.
Can anybody tell me how I can take all hyperlinks out of a string? Example: I have a string like this: 'blah blah bubble <a href="http://www.google.com/">googling's funny</a> bubble blah'. And it should transformed to 'blah blah bubble googling's funny bubble blah'.
strip_tags()
While strip_tags() removes all html tags from a string this is perhaps not that what the |
OP wants. I guess he is more looking for a regular expression like this:
/<a.*>|</a>/iu
Regards
Stefan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.