title: How to check if a PHP array has any value set?
body: <p>I am working on a signup form, I am using PHP and on my processing part I run some code, if a submitted item fails I then add it to an errors array.  </p>
  
  <p>Below is a snip of the code, I am at the point where I need to find the best method to determine if I should trigger an error.</p>
  
  <p>So if there is a value set in the error array then I need to redirect and do some other stuff.  </p>
  
  <p>I was thinking of using <code>isset</code> or else <code>is_array</code> but I don't think that is the answer since I set the array using <code>**$signup_errors = array()**</code> wouldn't this make the <code>is_array</code> be true?</p>
  
  <p>Can anyone suggest a good way to do this?</p>
  
  <pre><code>//at the beginning I set the error array
  $signup_errors = array();
  
  // I then add items to the error array as needed like this...
  $signup_errors['captcha'] = 'Please Enter the Correct Security Code';
  </code></pre>