title: MongoDB $and operator query in PHP
body: <p>I've been having difficulty with the $and operator and MongoRegex. </p>
  
  <p>I'm doing a regex record search for "Amazon" that also has the field "enabled" set to 1.</p>
  
  <p>This is my query.</p>
  
  <pre><code>$search = "Amazon";
  $results = $collection-&gt;find(array(
    '$and' =&gt; array(
       array('orgname' =&gt; new MongoRegex("/.*$search.*/")),
       array('enabled' =&gt; '1')
     )
  ));
  </code></pre>
  
  <p>Maybe someone can point out what I'm doing wrong.
  Thanks in Advance.</p>