clear_data()
Return type:
void
The Zip class caches your zip data so that it doesn’t need to recompile the Zip archive for each method you use above. If, however, you need to create multiple Zip archives, each with different data, you can clear the cache between calls. Example:
$name = 'my_bio.txt';
$data = 'I was born in an elevator...';
$this->zip->add_data($name, $data);
$zip_file = $this->zip->get_zip();
$this->zip->clear_data();
$name = 'photo.jpg';
$this->zip-