title: generate multiple pdf file and zip it
body: <p>I have a situation like create multiple pdf files and download as zip file.</p>
  
  <p>I have tried with below code</p>
  
  <pre><code>    function downloadZip()
      {
        if ($this-&gt;input-&gt;post('btn_submit')) 
        {
  
          $data = array(
               'results' =&gt; $this-&gt;Mdi_download_invoices-&gt;download_pdf_files($this-&gt;input-&gt;post('client_id'))
          );
  
          foreach ($data['results'] as $d)
          {
               $mpdf = new \Mpdf\Mpdf();
               $html = $this-&gt;load-&gt;view('download_all_invoices/pdf',$d,true);
               $mpdf-&gt;WriteHTML($html);
               $mpdf-&gt;Output(); //this will create a pdf file in next tab
  
               $this-&gt;load-&gt;library('zip');
               $this-&gt;zip-&gt;add_data();
               $this-&gt;zip-&gt;archive('/var/www/my_backup.zip');
               $this-&gt;zip-&gt;download('my_backup.zip');
          }
      }
  </code></pre>
  
  <p>How can I store all pdf file in the array??</p>