title: Trouble checking/verifying multidimensional array
body: <p><br />
  After i searched around and tried many alternatives for checking/verifying multidimensional array, i gave up, and I decided to open a new thread (asked a question) here. So, let me show you my progress until now.<br />
  I have a form that, by _POST, submits the informations in a multidimesional array. The array, after post, shows like this:</p>
  
  <pre><code>Array ( 
  [0] =&gt; Array ( 
      [Name] =&gt; First Name 
      [Birthday] =&gt; 01-02-2016 
      [BirthPlace] =&gt; PB1 
      [passNr] =&gt; Pass1 
      [passFrom] =&gt; 15-02-2016 
      [passTo] =&gt; 28-08-2016 
      [seatNr] =&gt; 16 
      [seatCode] =&gt; 6_4 
      [nrPax] =&gt; 1 
          ) 
  [1] =&gt; Array ( 
      [Name] =&gt; Second Name 
      [Birthday] =&gt; 02-02-2016 
      [BirthPlace] =&gt; PB2 
      [passNr] =&gt; Pass2 
      [passFrom] =&gt; 16-02-2016 
      [passTo] =&gt; 29-08-2016 
      [seatNr] =&gt; 15 [seatCode] =&gt; 6_3 
      [nrPax] =&gt; 1 
          ) 
  [2] =&gt; Array ( 
      [Name] =&gt; Third Name 
      [Birthday] =&gt; 03-02-2016 
      [BirthPlace] =&gt; PB3 
      [passNr] =&gt; Pass3 
      [passFrom] =&gt; 17-02-2016 
      [passTo] =&gt; 30-08-2016 
      [seatNr] =&gt; 14 
      [seatCode] =&gt; 6_2 
      [nrPax] =&gt; 1 
          ) 
  [3] =&gt; Array ( 
      [Name] =&gt; Fourth Name 
      [Birthday] =&gt; 04-02-2016 
      [BirthPlace] =&gt; PB4 
      [passNr] =&gt; Pass4 
      [passFrom] =&gt; 18-02-2016 
      [passTo] =&gt; 31-08-2016 
      [seatNr] =&gt; 13 
      [seatCode] =&gt; 6_1 
      [nrPax] =&gt; 1 
          ) 
    ) 
  </code></pre>
  
  <p>What i need to do is to verify if all items are submit / if any of them is empty/null. I have tried this one:</p>
  
  <pre><code>foreach ($_POST['traveler'] as $vf) {
  if(empty($vf['Name'])) {echo "Missing Name.&lt;br /&gt;";}
  if(empty($vf['Birthday'])) {echo "Missing Birthday.&lt;br /&gt;";}
  if(empty($vf['BirthPlace'])) {echo "Missing BirthPlace.&lt;br /&gt;";}
  if(empty($vf['passNr'])) {echo "Missing passNr.&lt;br /&gt;";}
  if(empty($vf['passFrom'])) {echo "Missing passFrom.&lt;br /&gt;";}
  if(empty($vf['passTo'])) {echo "Missing passTo.&lt;br /&gt;";}
  if(!empty($vf['Name']) &amp;&amp; !empty($vf['Birthday']) &amp;&amp; !empty($vf['BirthPlace']) &amp;&amp; !empty($vf['passNr']) &amp;&amp; !empty($vf['passFrom']) &amp;&amp; !empty($vf['passTo']) ) { echo "Everything OK. Do the insertion in the mysql";}
   }
  </code></pre>
  
  <p>The problem is that, if the multidimensional array has 3 arrays in it, the msg "Everything OK..." appears three times; if are 4 arrays, appear 4 times... So, if i do the sql insertion, it will be added as many times as arrays are. <br />
  Also, i should mention that Birthday, passFrom and passTo are input fields for dates and, if the user let them blank, not filling them, in the array, those fields appears with php default date 01.01.1970; in this case, how to verify that the user fills  the form correctly?<br />
  Thanks in advance, and hope i was clear on explaining the issue.</p>