title: How to check if all values in multidimensional array are empty
body: <p>I have a form posting a multidimensional array to my PHP script, I need to know if all the values in the array are empty or not.</p>
  
  <p>Here is my array:</p>
  
  <pre><code>$array[] = array('a'=&gt;'',
                   'b'=&gt;array('x'=&gt;''),
                   'c'=&gt;array('y'=&gt;array('1'=&gt;'')),
                   'd'=&gt;'');
  </code></pre>
  
  <p>I tried using array_reduce(), but it's just returning an array:</p>
  
  <pre><code>echo array_reduce($array, "em");
  
  function em($a,$b){
      return $a.$b;
  }
  </code></pre>
  
  <p>Any ideas?</p>