title: PHP asXML Write (Append) To File
body: <p>I have a PHP which is fetching XML data from a long list of URLs.  It appears that this is over-writing the xml.log file, how can I get it to append to the file instead?</p>
  
  <pre><code>&lt;?php
  
  include("connect.php");
  
  $query = "SELECT * FROM urls_list";
  $result = mysqli_query($conn, $query) or die("MySQL Error..." . mysqli_error($conn));
  
  while ($row = mysqli_fetch_array($result))
  {
     $url = $row['url'];   
     $xml = simplexml_load_file($url);
     echo $xml-&gt;asXML('xml.log');
  }
  
  ?&gt;
  </code></pre>