title: Change tag attribute value with PHP DOMDocument
body: <p>I want to change the value of the attribute of a tag with PHP DOMDocument.</p>
  
  <p>For example, say we have this line of HTML:</p>
  
  <pre><code>&lt;a href="http://foo.bar/"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>I load the above code in PHP as follows:</p>
  
  <pre><code>$dom = new domDocument;
  $dom-&gt;loadHTML('&lt;a href="http://foo.bar/"&gt;Click here&lt;/a&gt;');
  </code></pre>
  
  <p>I want to change the "href" value to "http://google.com/" using the DOMDocument extension of PHP. Is this possible?</p>
  
  <p>Thanks for the help as always!</p>