title: PHP - Can I apply custom font styles to the header of a CSV file?
body: <p>Is that a way to custom the header of a generated csv file :</p>
  
  <pre><code>$result = $db-&gt;select(" table","",""," fitstname, lastname, campany");
  $headers = array("fistname","lastname","campany"); 
  $fp = fopen('php://output', 'w'); 
  
  if ($fp &amp;&amp; $result) {     
      header('Content-Type: text/csv ; charset=utf-8');
      header('Content-Disposition: attachment; filename="recap.csv"');
      header('Pragma: no-cache');    
      header('Expires: 0');
  
      fputcsv($fp, $headers); 
      for ($i= 0; $i &lt; sizeof($result); $i++) {
          fputcsv($fp, array_values($result[$i])); 
      }
      die; 
  } 
  </code></pre>
  
  <p><strong>updated :</strong>
  here the output :</p>
  
  <pre><code>nom,prenom,societe
  Charles,Olivier,"Zed way"
  Bernard,Gautier,"Media Productions"
  </code></pre>
  
  <p>Regards .</p>