title: PHP Implode But Wrap Each Element In Quotes
body: <p>Assume I have an array:</p>
  
  <pre><code> $elements = array('foo', 'bar', 'tar', 'dar');
  </code></pre>
  
  <p>Then I want to build up a <code>DELETE IN</code> SQL query:</p>
  
  <pre><code> $SQL = "DELETE FROM elements
                 WHERE id IN ('" . implode(',', $elements) . "')";
  </code></pre>
  
  <p>The problem is that the ids in the elements array aren't quoted each individually. I.E the query looks like:</p>
  
  <pre><code> $SQL = "DELETE FROM elements
                 WHERE id IN ('foo,bar,tar,dar');
  </code></pre>
  
  <p>What's the best, most elegants way to fix this?</p>