||1. Problem related to DOMDocument
|I am trying to extract all the links ("a" tags) and storing href and anchor text(raw text between the <a> and </a> tags) into Database.|
I am having no problem doing this until the contents are an image.
HTML file contains code like following line in many places -
<a href="http://example.com"><img src="example.gif"></a>
My code o
I am using DOM objects but unable to access it.
My code is like -
$dom = new DOMDocument();
$xpath = new DOMXPath($dom);
$hrefs = $xpath->evaluate("//a");//get all a tags
for ($i = 0; $i < $hrefs->length; $i++)
$href = $hrefs->item($i);
If anyone has any idea/suggestion, please share it...
Thanks in advance
There are 2 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.
Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.