title: File upload with SESSION array instead of $_FILES?
body: <p>The question is: Is there is any way to make it work with SESSION array ?</p>
  
  <p>Because i have assigned $_FILES["file"] to a SESSION array, it would not upload a file. When i use var_dump($_SESSION['test'][1]["tmp_name"]) and var_dump($_FILES["file"]["tmp_name"]) it would show the same value. any idea guys ? </p>
  
  <pre><code>//THIS WONT WORK
      $_SESSION['file'][] = $_FILES["file"];
      $_SESSION['file'][] = $_FILES["file2"];
      foreach($_SESSION['file'] as $index =&gt; $name){
         move_uploaded_file($_SESSION['file'][$index]["tmp_name"], "images/" . $rename);
      }
  //THIS WORKS OK
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "images/" . $rename);
  </code></pre>
  
  <p>Ok now few words why i need to use session ... I need to use session because i have multiple files that i want to upload through foreach statement.</p>
  
  <p>// print_r($_SESSION["file"]) would output:</p>
  
  <pre><code>array(1) {
    [0]=&gt;
    array(5) {
      ["name"]=&gt;
      string(8) "face.jpg"
      ["type"]=&gt;
      string(10) "image/jpeg"
      ["tmp_name"]=&gt;
      string(31) "C:\EasyPHP-12.1\tmp\php882C.tmp"
      ["error"]=&gt;
      int(0)
      ["size"]=&gt;
      int(22398)
    }
  }
  </code></pre>