title: PHP implode quoted string
body: <pre><code>$brand_condition = ' AND ' . mysql_real_escape_string($brand_selection) . ' IN ';
  
  $brand_condition .= $quote10 . '"'. mysql_real_escape_string($brand_value) . '"' .$quote9;
  
  $brand_conditions[] = $brand_condition;
  
  $query .= implode(' AND ', $brand_conditions) . '';
  </code></pre>
  
  <p>This produces: AND manufacturer IN ("brand1,brand2")</p>
  
  <p>Since I'm using the IN statement, I need the values to be quoted. At the same time, I am escaping potential quotes with mysql_real_escape_string.</p>
  
  <p>Does anyone see a simple way to get around this small problem?</p>