title: multiple image upload using foreach loop and inserting to database
body: <p>I am having trouble getting the image files I wanted them to insert in my database I want the
  picture like the one I uploaded like this:</p>
  
  <pre><code>insert into('pic1.jpg');
  
  insert into('pic2.jpg');
  
  insert into('pic3.jpg');
  </code></pre>
  
  <p>not like this:</p>
  
  <pre><code>insert into(Array[0] =&gt; pic1.jpg, Array[1] =&gt; pic2.jpg, Array[2] =&gt; pic3.jpg);
  </code></pre>
  
  <p>so i can get their name only and insert in in  my database
  im required to use  <strong>foreach loop</strong></p>
  
  <pre><code>  if(isset($_POST['upload'])){
        $upload[] = ($_FILES['images']['name']);
        print_r($upload);
     }
  
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form method="POST" enctype="multipart/form-data"&gt;        
          &lt;input type="file" name="images[]" multiple="multiple"&gt;
          &lt;input type="submit" name="upload" value="upload"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>