title: PHP: Find empty value in array
body: <p>I want to display an error if one of the <code>&lt;input&gt;</code> boxes the user has submitted is empty, but I also want to process the boxes that do not have empty names.</p>
  
  <p>Here is the form: <a href="http://jsfiddle.net/Draven/rEPXM/27/" rel="nofollow">http://jsfiddle.net/Draven/rEPXM/27/</a></p>
  
  <p>PHP:</p>
  
  <pre><code>if(isset($_POST['addFolder']))
  {    
      foreach($_POST['folder'] as $id =&gt; $value)
      {
          $database-&gt;query('INSERT INTO folders (name) VALUES (?)', array($value));
      }
      $success[] = "Folder(s) added";                 
  }
  </code></pre>