title: Warning: Invalid argument supplied for foreach() in... php
body: <p>I have been looking for some time the solution to eliminate my error message :  </p>
  
  <pre><code>Warning: Invalid argument supplied for foreach() in...
  </code></pre>
  
  <p>Here is my code :</p>
  
  <pre><code>    $data = $_POST;
  
      if (count($data) &gt; '1') {
          var_dump($data);
  
          foreach ($data as $k =&gt; $row) {
              var_dump($row);
  
                  foreach ($row as $k2 =&gt; $img) {
                      echo $img;
                  }
          }
  </code></pre>
  
  <p>Here's the result : 
  (The result is good only the error message here is annoying)</p>
  
  <pre><code>array (size=2)
    'image' =&gt; 
      array (size=2)
        0 =&gt; string '608' (length=3)
        1 =&gt; string '610' (length=3)
    'submit' =&gt; string 'Save' (length=11)
  array (size=2)
    0 =&gt; string '608' (length=3)
    1 =&gt; string '610' (length=3)
  
  608610
  
  string 'Save' (length=11)
  </code></pre>
  
  <p>I tried to add a isset for $data, without success ..</p>