I\'m trying to create a short PHP script that takes a JSON string, converts it to CSV format (using fputcsv), and makes that CSV available as a downloaded .csv file
fputcsv
Firstly, check this string out, i would change it to:
header('Content-Disposition: attachment; filename="'.basename($tmp).'"');
i had the problem with it once, with browser compatibility :)