title: MySQL and fputcsv PHP fields delimiter not working
body: <p>Here's my code:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL ^ E_NOTICE);
  header('Content-Type: text/csv; charset=utf-8');
  header('Content-Disposition: attachment; filename=data.csv');
  $output = fopen('php://output', 'w');
  fputcsv($output, array('field1', 'field2'),';','"');
  mysql_connect('localhost', 'usr', 'psswd');
  mysql_select_db('db');
  $rows = mysql_query('
  SELECT
  field1,
  field2
  FROM table
  ');
  while ($row = mysql_fetch_assoc($rows)) fputcsv($output, $row);
  mysqli_close($con);
  ?&gt;
  </code></pre>
  
  <p>The result is that ";" delimiter is only used in the header of the csv file, not in every row.
  Tanks.</p>