title: in_array displaying all values from array loop
body: <p>I'm trying to check if the values in a foreach loop are in an array from a query. If each of the values are not in the query it is supposed to get placed into the no_email_entered array, but when I print out the array it prints out ALL of the values that are contained in $user->user_email when it should be only printing out the ones that are not contained in the $my_user_mails array. I tried a nested foreach as well and that didn't seem to work either. I'd appreciate a second eye on this.</p>
  
  <pre><code>&lt;?php
      //Creates empty array for inserts
      $no_email_entered = array();
      //Make a loop for the emails
      foreach( $users_for_site as $user ) {
      //Check if each email is in $my_user_emails array, if not add it to the $no_email_entered array 
          if( ! in_array( $user-&gt;user_email, $my_user_emails ) ) {
              $no_email_entered[] = $user-&gt;user_email;
          }
      }
      ?&gt;
  </code></pre>
  
  <p>Printed results of $no_email_entered array gives me ALL the emails from $users_for_site, which is not correct.</p>