|
Posted by Geoff Berrow on 03/12/06 13:42
I'm trying to output the results of a database query as a csv file
The DB output is in $csv
foreach($csv as $array){
$line[]=implode($delimited_by,$array)."\n";
}
header("Content-Type: text/plain");
header("Content-Disposition: inline");
foreach($line as $output){
print $output;
On clicking the link to this file the results are output to the screen.
I can right click and save the output but I'm prompted to save it as a
..php file. How can I make it output as the right kind ( .csv) of file?
--
Regards,
Geoff Berrow
Navigation:
[Reply to this message]
|