title: Multiple upload images using codeigniter
body: <p>Hi i have this file upload of images, and i want to do with a multiple images. Ive been searching in google and i found any no luck at all. I have this code <code>&lt;input type="file" name="photo[]" multiple="" /&gt;</code> and in my controller here</p>
  
  <pre><code>        echo ("&lt;pre&gt;");
          print_r($_FILES);
          echo ("&lt;/pre&gt;s");
          $name_array = array();
          $count = count($_FILES['photo']['size']);
          $ctr = 0;
  
          if ($_FILES){
          $files = $_FILES['photo'];
          foreach($_FILES['photo']['name'] as $key=&gt;$value){
  
              $_FILES['photo']['name']= $files['name'][$ctr];
              $_FILES['photo']['type']    = $files['type'][$ctr];
              $_FILES['photo']['tmp_name'] = $files['tmp_name'][$ctr];
              $_FILES['photo']['error']       = $files['error'][$ctr];
              $_FILES['photo']['size']    = $files['size'][$ctr];  
  
  
               echo ("&lt;pre&gt; NEW &gt;&gt;&gt; " . $ctr);
          print_r($_FILES);
          echo ("&lt;/pre&gt;");
          $ctr++;
                  $config['upload_path'] = './uploads/';
                  $config['allowed_types'] = 'gif|jpg|png';
                  $config['max_size'] = '2048';
                  //$config['max_width']  = '1024';
                  //$config['max_height']  = '768';
              $this-&gt;load-&gt;library('upload', $config);
  
              $this-&gt;upload-&gt;do_upload();
              $data = $this-&gt;upload-&gt;data();
  
              print_r($data);
              $name_array[] = $data['file_name'];
              $names= implode(',', $name_array);
  /*          $this-&gt;load-&gt;database();
              $db_data = array('id'=&gt; NULL,
                               'name'=&gt; $names);
          $this-&gt;db-&gt;insert('testtable',$db_data);
  */          print_r($names);
          }   
  
              }
  </code></pre>
  
  <p>my action <code>&lt;?php echo form_open_multipart('post/add') ?&gt;</code></p>
  
  <p>and what ive got the error is this way</p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Warning
  
  Message: is_uploaded_file() expects parameter 1 to be string, array given
  
  Filename: libraries/Upload.php
  
  Line Number: 161
  You did not select a file to upload.
  </code></pre>
  
  <p>Can someone help me figured this thing out? on how multiple uploads will do in codeigniter?? Any help is muchly appreciated. Thanks</p>