title: Dom Node for PHP find href attribute issue
body: <p>I am trying to pull the href from a url from some data using php's domDocument.</p>
  
  <p>The following pulls the anchor for the url, but I want the url</p>
  
  <pre><code>$events[$i]['race_1'] = trim($cols-&gt;item(1)-&gt;nodeValue); 
  </code></pre>
  
  <p>Here is more of the code if it helps.</p>
  
  <pre><code>   // initialize loop
     $i = 0;
     // new dom object  
     $dom = new DOMDocument();  
  
     //load the html  
     $html = @$dom-&gt;loadHTMLFile($url);  
     //discard white space   
     $dom-&gt;preserveWhiteSpace = true;   
  
     //the table by its tag name  
     $information = $dom-&gt;getElementsByTagName('table'); 
     $rows = $information-&gt;item(4)-&gt;getElementsByTagName('tr');  
  
     foreach ($rows as $row)   
     { 
      $cols = $row-&gt;getElementsByTagName('td');   
      $events[$i]['title'] = trim($cols-&gt;item(0)-&gt;nodeValue); 
      $events[$i]['race_1'] = trim($cols-&gt;item(1)-&gt;nodeValue);   
  $events[$i]['race_2'] = trim($cols-&gt;item(2)-&gt;nodeValue);  
  $events[$i]['race_3'] = trim($cols-&gt;item(3)-&gt;nodeValue);
  $date = explode('/', trim($cols-&gt;item(4)-&gt;nodeValue));
  $events[$i]['month'] = $date['0'];
  $events[$i]['day'] = $date['1'];
  $citystate = explode(',', trim($cols-&gt;item(5)-&gt;nodeValue));   
  $events[$i]['city'] = $citystate['0'];
  $events[$i]['state'] = $citystate['1'];
  $i++;
     }
     print_r($events);
  </code></pre>
  
  <p>Here is the contents of the TD tag</p>
  
  <blockquote>
  <pre><code>&lt;td width="12%" align="center" height="13"&gt;&lt;!--mstheme--&gt;&lt;font face="Arial"&gt;&lt;span lang="en-us"&gt;&lt;b&gt;
            &lt;font style="font-size: 9pt;" face="Verdana"&gt;
            &lt;a linkindex="18" target="_blank" href="results2010/brmc5k10.htm"&gt;Overall&lt;/a&gt;    
  </code></pre>
    
    <p></p>
  </blockquote>