fputcsv doesn't write any data in a CSV file
问题 In my web site I'm creating a table from the mysql data and then now I want to add a export button buttom of the table so that a user will be able to download the data as an CSV file. To do that I wrote dummy form: <form action="<?=$_SERVER['PHP_SELF'];?>" method="post"> <input type="submit" name="submit" value="Click Me"> </form> And at the top of the php file I have: if(isset($_POST['submit'])) { export(); } In my export function I have some mysql stuff, I'm creating an array and pushing