title: CSV File as ASCII and with CRLF
body: <p>I need a CRLF (char10,char(13) for each line in my csv file. The samples i found are not properly working. And i need the file in ASCII not UTF8. How can i save it as ASCII?</p>
  
  <p>My code:  </p>
  
  <pre><code>$fp = fopen('import.csv', 'w');
  
  while ($daten = pg_fetch_assoc($query))
  {
      fputcsv($fp,$daten,chr(9));
  }
  </code></pre>