Explode Anchor

This is a discussion on "Explode Anchor" within the PHP Forum section. This forum, and the thread "Explode Anchor are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 23rd, 2005, 11:22
New Member
Join Date: Jul 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Explode Anchor

No, I am not a pirate with an intention of blowing up things, I am a coder.

Anyway: I need a snippet of code that splits the 'a href' part of the site so it can read the link. So far I have
Code: Select all
$getlinks = explode("<a href=*>", $read);
This is a little advanced, but i would be very appreciative if anyone can help.

Sheeps.
Reply With Quote

  #2 (permalink)  
Old Jul 23rd, 2005, 12:31
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
How about this?
Code: Select all
<?

$link = "<a href=\"http://www.webforumz.com/\">Webforumz</a>";

preg_match("/<a href=\"([^`]*?)\">/", $link, $match);

print_r($match);

?>
Reply With Quote
  #3 (permalink)  
Old Jul 23rd, 2005, 13:24
New Member
Join Date: Jul 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks a lot, works perfectly.
Reply With Quote
Reply

Tags
explode, anchor

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight anchor? ktsirig Web Page Design 1 Apr 28th, 2008 12:54
Question about anchor text belock1980 Starting Out 3 Apr 17th, 2008 16:36
Link Anchor Text Question fireboat Search Engine Optimization (SEO) 5 Sep 11th, 2007 06:10
Pass Dynamic values in Anchor Tag PraveenAnekalmat JavaScript Forum 0 May 4th, 2007 10:19
What do I need to know to anchor a nav bar? Pherdnut Web Page Design 2 Nov 22nd, 2006 21:21


All times are GMT. The time now is 06:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43