title: how to dynamically name the xml while creating xml
body: <p>I need to save the XML and dynamically name the each newly created xml according to current date with increment of each new XML. </p>
  
  <p>lets assume if I access the html form today first time and create an XML after submiting the form then the XML Name should be 
  <strong>Current Date-001</strong> </p>
  
  <blockquote>
    <p>(20161225-001)</p>
  </blockquote>
  
  <p>and if I create the new XML from accessing the HTML Form then the NExt XML should be saved as </p>
  
  <blockquote>
    <p>20161225-002</p>
  </blockquote>
  
  <p>and it goes on.</p>
  
  <p>this is my Code.</p>
  
  <pre><code>&lt;?php
  date_default_timezone_set('Europe/London');
   $date = date('Y-m-d H:i:s');
  $xml= new DomDocument("1.0","UTF-8");
  $xml-&gt;formatOutput=true;
  $doc=$xml-&gt;createElement("clip");
  $xml-&gt;appendChild($clip);
  
  $supplier=$xml-&gt;createElement("supplier");
  $supplier-&gt;setAttribute("id",1);
  $clip-&gt;appendChild($supplier);
  //first metadata tag
  $metadata=$xml-&gt;createElement("metadata");
  $clip-&gt;appendChild($metadata);
  $name=$xml-&gt;createElement("name","owner");
  $metadata-&gt;appendChild($name);
  $value=$xml-&gt;createElement("value","self");
  $metadata-&gt;appendChild($value);
  echo "&lt;xmp&gt;".$xml-&gt;saveXML()."&lt;/xmp&gt;";
      $xml-&gt;save("company_test.xml") or die("Error,Unable to create");
  ?&gt;
  </code></pre>