Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-19-2009, 02:09 PM   PM User | #1
tau9
New Coder

 
Join Date: Jan 2009
Posts: 48
Thanks: 28
Thanked 0 Times in 0 Posts
tau9 is an unknown quantity at this point
get elements by tag name <a>

Hi,

I am trying to get all active links from a txt document but I can only get the attribute name i.e the text of the link and not the link it self.

echo '<ul>';

foreach ($elements as $kw) {
echo '<li>'.htmlentities($kw->nodeValue).'</li>';
}
echo '</ul>';

I have tried adding =href to between the '<li>' but not working any ideas?

Thanks in advance
tau9 is offline   Reply With Quote
Old 03-19-2009, 03:26 PM   PM User | #2
djm0219
Senior Coder

 
djm0219's Avatar
 
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,227
Thanks: 2
Thanked 189 Times in 187 Posts
djm0219 is on a distinguished road
The href attribute should contain the actual link.
__________________
Dave .... HostMonster for all of your hosting needs
djm0219 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:26 AM.


Advertisement
Log in to turn off these ads.