title: Where Clause ARRAY in PHP - MongoDB
body: <p>I have one problem for Where clause in PHP - MongoDB.</p>
  
  <p>i search in this forum and obtain some information.</p>
  
  <p>My code is :</p>
  
  <pre><code>$condizioneMongoDB = "array('chrom'=&gt;'chr7' )";
  $whereClause = eval("\$str = \"$condizioneMongoDB\";");
  $retval = $collection-&gt;distinct("p_id", $whereClause);
  </code></pre>
  
  <p>The Where clause is completely ignored.</p>
  
  <p>This static code work:</p>
  
  <pre><code>$retval = $collection-&gt;distinct("p_id", array('chrom'=&gt;'chr7' ));
  </code></pre>