title: Compare for existing values from 2 foreach loops?
body: <p>I have 2 foreach loop's where i get new results from my first db and i have second foreach where i get data from second db</p>
  
  <p>My first foreach code is:</p>
  
  <pre><code>foreach($_existing_data_result as $result) {
  echo $result-&gt;name.'&lt;br&gt;';
  }
  </code></pre>
  
  <p>second foreach:</p>
  
  <pre><code>foreach($_new_data_result as $resultNew) {
  echo $resultNew-&gt;name.'&lt;br&gt;';
  }
  </code></pre>
  
  <p>I need to check on second foreach if result exist in first then ignore this result, i tried it with <code>in_array()</code>but i always see double names...</p>