title: PHP output to file for download without creating file on the server
body: <p>I would like to output my data to a file for the user to download without actually creating the file physically on the server. The data of the file is simply array that I'm converting into a CSV format for the user to download. Here's my code:</p>
  
  <pre><code>$fh = fopen('file.csv','w');
  fputcsv($fh,$arr); // $arr is my array that contains the data to be parsed into CSV
  fclose($out);
  </code></pre>
  
  <p>The above code creates the file successfully... but I don't want to have to create a file. I want to simply stream the output. </p>
  
  <p>Any help would be greatly appreciated!</p>