Skip to content
Snippets Groups Projects
Commit 5a6ebff1 authored by Prasad's avatar Prasad
Browse files

Using php csv function.

parent d3aa4a3b
No related branches found
No related tags found
No related merge requests found
......@@ -170,21 +170,14 @@ class Vtiger_ExportData_Action extends Vtiger_Mass_Action {
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header("Cache-Control: post-check=0, pre-check=0", false );
$header = implode("\", \"", $headers);
$header = "\"" .$header;
$header .= "\"\r\n";
echo $header;
$fp = fopen("php://output", "w");
fputcsv($fp, $headers);
foreach($entries as $row) {
// Escape double quotes in the value.
foreach ($row as $key => $value) {
$row[$key] = str_replace('"', '""', $value);
}
$line = implode("\",\"",$row);
$line = "\"" .$line;
$line .= "\"\r\n";
echo $line;
fputcsv($fp, $row);
}
fclose($fp);
}
private $picklistValues;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment