php setAttribute replacing & with &amp;
<p>I'm trying to do somwthing like this (where $doc is a DOMDocument)</p>

<pre><code>$link_found = $doc-&gt;getElementsByTagName('a');

foreach ($link_found as $idx =&gt; $link) {
    $link-&gt;setAttribute('href', "/test.php?t=1&amp;q=2" ) ;
}
</code></pre>

<p>All is working, but in the href now I got </p>

<pre><code>"/test.php?t=1&amp;amp;q=2" 
</code></pre>

<p>I need the literal <code>&amp;</code>, not encoded in <code>&amp;amp;</code></p>

<p>I need </p>

<pre><code> "/test.php?t=1&amp;q=2"
</code></pre>

<p>Like a common query string</p>
