title: MongoDB PHP using $in with array
body: <p>I'm using MongoDB and PHP and trying to do a $in based on a generated array.</p>
  
  <p>When I specify the same array manually, it works, but when I build it, it return any results with the same data.</p>
  
  <p>There's what I have:</p>
  
  <pre><code>$settings = array();
  foreach($items as $item) {
     $settings[] = $item['id'];
  }
  
  //Settings is the same as this
  $setting2 = array(1,2,3,4,5,6,7,8);
  
  //This returns no results
  $cursor = $collection-&gt;find(array('status' =&gt; 0, 'sid' =&gt; array('$in' =&gt; $settings)));
  
  
  //This does return results
  $cursor = $collection-&gt;find(array('status' =&gt; 0, 'sid' =&gt; array('$in' =&gt; $setting2)));
  </code></pre>
  
  <p>I've checked using </p>
  
  <blockquote>
    <p>$cursor->info() </p>
  </blockquote>
  
  <p>And the items in the array are the same.</p>
  
  <p>Any ideas what I'm doing wrong?</p>
  
  <p>Thanks!</p>