title: Count number of non-empty items in array?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4422889/how-to-count-non-empty-entries-in-php-array">how to count non-empty entries in php array?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to count the number of keys in an array that aren't empty/null.</p>
  
  <pre><code>EG:
  array(1&gt;'asdf',2&gt;'fdas',3&gt;'');
  
  count($array) would return 3, I want a function that returns 2 as 3 is empty
  </code></pre>
  
  <p>Are there any php built in functions to do this? How can it be done? </p>