[eluser]sherpa[/eluser]
I can create a single zip file with multiples files in it. But what i want is multiple zip files in a single zip created by CI itself.
My code goes like this. I just can't figure out where the problem is :
Code:
function getAll($id){
$Contents = $this -> frontend -> DownloadFiles($id);
$data = array();
$RecordCount = 0;
for($RecordCount = 0; $RecordCount < count($Contents['keywords']);$RecordCount++)
{
$file_contents_title = $Contents['title'][$RecordCount])));
$file_contents_desc = $Contents['description'][$RecordCount])));
$file_content_keywords = $Contents['keywords'][$RecordCount];
$file_content = $Contents['contents'][$RecordCount])));
$data[url_title($file_contents_title). "_CONTENTS.txt"] = $file_content;
$data[url_title($file_contents_title). "_KEYWORDS.txt"] = $file_content_keywords;
$data[url_title($file_contents_title). "_DESCRIPTION.txt"] = $file_contents_desc;
}
$this -> zip -> add_data($data);
$zip_file = $this -> zip -> get_zip();
$this->zip->download($Contents['filename'] . '.zip');
}
Thnaks in advance.