title: PDO with "WHERE... IN" queries
body: <p>I'm reworking some PHP code to use PDO for the database access, but I'm running into a problem with a "WHERE... IN" query.</p>
  
  <p>I'm trying to delete some things from a database, based on which items on a form are checked. The length and content of the list will vary, but for this example, imagine that it's this:</p>
  
  <pre><code>$idlist = '260,201,221,216,217,169,210,212,213';
  </code></pre>
  
  <p>Then the query looks like this:</p>
  
  <pre><code>$query = "DELETE from `foo` WHERE `id` IN (:idlist)";
  $st = $db-&gt;prepare($query);
  $st-&gt;execute(array(':idlist' =&gt; $idlist));
  </code></pre>
  
  <p>When I do this, only the first ID is deleted. (I assume it throws out the comma and everything after it.)</p>
  
  <p>I've also tried making <code>$idlist</code> an array, but then it doesn't delete anything.</p>
  
  <p><strong>What's the proper way to use a list of items in a PDO prepared statement?</strong></p>