title: File upload how to extract this element
body: <p>I have an HTML form with a file input field.</p>
  
  <p>In the PHP layer, how do I extract the correct <code>tmp_name</code> value, taking into consideration that <code>tmp_name</code> is an array and that its size may vary?</p>
  
  <p>Thank you.</p>
  
  <pre><code>  $data = $_FILES['option_value'];
  
    foreach ($data as $key =&gt; $value) {
      var_dump($value);
    }
  </code></pre>
  
  <p>The result is :</p>
  
  <pre><code>array (size=5)
    'name' =&gt; 
      array (size=1)
        3 =&gt; 
          array (size=1)
            'image' =&gt; string 'carre_noire.jpg' (length=15)
    'type' =&gt; 
      array (size=1)
        3 =&gt; 
          array (size=1)
            'image' =&gt; string 'image/jpeg' (length=10)
    'tmp_name' =&gt; 
      array (size=1)
        3 =&gt; 
          array (size=1)
            'image' =&gt; string '/tmp/phpsUUxYC' (length=14)
    'error' =&gt; 
      array (size=1)
        3 =&gt; 
          array (size=1)
            'image' =&gt; int 0
    'size' =&gt; 
      array (size=1)
        3 =&gt; 
          array (size=1)
            'image' =&gt; int 5809
  </code></pre>