hi following code i use
public function exportData($type,$empid) {
$exportPlugin = $this->_getPlugin($type);
$fileName = $exportPlugin->getName();
$csvContents = $exportPlugin->getHeader() . "\n" . $exportPlugin->getCSVData();
$toddayDate = date("d-m-Y");
$csvName = $fileName."_".$toddayDate;
ob_end_clean();
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Type: text/csv");
header('Content-Disposition: attachment; filename="' . $csvName . '.csv";');
header("Content-Transfer-Encoding: none");
echo $csvContents;
}
in a above code i use $type for store two different type of plugin name but if i use array for name and use one by one it will give me only one file downloaded but not a 2nd one how should i get two files at the time in my download folder .
_getPlugin()i use for check the user get only that plugin which is in $type variable, in $csvContents stores the actual data which is collected by the getCSVData()