title: How to count no of non-empty array value in multidimensional array?
body: <pre><code>[pending_work] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [tmp_name] =&gt; D:\xampp\tmp\php4B33.tmp
                      [error] =&gt; 0
                      [name] =&gt; Chrysanthemum.jpg
                      [type] =&gt; image/jpeg
                      [size] =&gt; 879394
                  )
  
              [1] =&gt; Array
                  (
                      [tmp_name] =&gt; 
                      [error] =&gt; 4
                      [name] =&gt; 
                      [type] =&gt; 
                      [size] =&gt; 0
                  )
  
              [2] =&gt; Array
                  (
                      [tmp_name] =&gt; 
                      [error] =&gt; 4
                      [name] =&gt; 
                      [type] =&gt; 
                      [size] =&gt; 0
                  )
  
              [3] =&gt; Array
                  (
                      [tmp_name] =&gt; 
                      [error] =&gt; 4
                      [name] =&gt; 
                      [type] =&gt; 
                      [size] =&gt; 0
                  )
  
          )
  </code></pre>
  
  <p>This is the above array which is giving array values. As you can see there is only one 'tmp_name' field which is not empty and other are empty. How can i check and count wether atleast one of tmp_name is not empty ?.  I have four input types for uploading images and I want to check for atleast one of the image should be uploaded.  </p>