title: How to store a PHP variable value into an XML file?
body: <p>This is my XML file as <code>conf.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;conf&gt;
    &lt;auth&gt;
       &lt;ids&gt;&lt;/ids&gt;
       &lt;key&gt;&lt;/key&gt;
    &lt;/auth&gt;
  &lt;/conf&gt;
  </code></pre>
  
  <p>This is my PHP file as <code>change.php</code></p>
  
  <pre><code>&lt;?php   
    $DBUNAME="BOB1";
    $DBPWD="BOB2";  
  ?&gt;
  </code></pre>
  
  <p>I want that variable <code>$DBUNAME</code> and <code>$DBPWD</code> gets added into the XML file as an element </p>
  
  <pre><code>&lt;ids&gt;BOB1&lt;/ids&gt;
  &lt;key&gt;BOB2&lt;/key&gt;
  </code></pre>