title: How to save dom with xml
body: <p>I am saving my dom xml file with </p>
  
  <pre><code>`&lt;?php
  if(isset($_POST["song"])&amp;&amp; $_POST['song'] != "") 
      {
          $song = $_POST["song"];
      }
      else {$song=array();} 
  
  $dom = new DOMDocument("1.0");
  // display document in browser as plain text 
  // for readability purposes
  
  // create root element
  $root = $dom-&gt;createElement("playlist");
  $dom-&gt;appendChild($root);
  $root-&gt;setAttribute('version', "1");
  $root-&gt;setAttribute('xmlns', "http://xspf.org/ns/0/");
  $rootnext = $dom-&gt;createElement("trackList");
  $root-&gt;appendChild($rootnext);
  foreach ($song as $counter) {
      $tokens = ",";
      $tokenized = strtok($counter, $tokens);
  // create child element
  
  $song = $dom-&gt;createElement("track");
  $rootnext-&gt;appendChild($song);
  $song1 = $dom-&gt;createElement("creator");
  $song-&gt;appendChild($song1);
  $text = $dom-&gt;createTextNode("www.indiantags.com");
  $song1-&gt;appendChild($text); 
  $song1 = $dom-&gt;createElement("title");
  $song-&gt;appendChild($song1);
  // create text node
  $text = $dom-&gt;createTextNode($tokenized);
  $song1-&gt;appendChild($text); 
  $tokenized = strtok($tokens);
  $song1 = $dom-&gt;createElement("location");
  $song-&gt;appendChild($song1);
  $text = $dom-&gt;createTextNode($tokenized);
  $song1-&gt;appendChild($text); 
  
  }
  
  // save 
  $dom-&gt;save("playlist.xml");
  
  ?&gt;
  &lt;object data="42-mp3player.swf?autostart=true&amp;playlist=playlist.xml" type="application/x-shockwave-flash" width="400" height="300"&gt;&lt;param name="movie" value="42-mp3player.swf?autostart=true&amp;playlist=playlist.xml"/&gt;&lt;/object&gt;
  </code></pre>
  
  <p>` </p>
  
  <p>But all I need is I want to save this playlist.xml file with dynamic name some thing with microtime function or else sessionid name ..any body would like to throw some light on it?</p>
  
  <p>Thank you</p>