title: array is converted as string in PDO
body: <p>Below is my query:</p>
  
  <pre><code>$key = array(1,2);
  $in = join(',', array_fill(0, count($key), '?'));
  $statement = $pdo-&gt;prepare("SELECT * FROM posts WHERE posts.subid IN (".$in.") AND posts.pricing=?  AND posts.Poscode=? ORDER BY posts.Poscode DESC LIMIT 60");
  $result = array_merge($key, array($rate,$postcode));
  $statement-&gt;execute($result);
  </code></pre>
  
  <p>When I replace <code>$key = array(1,2);</code> with <code>$key = array($key);</code> the query only fetches data for the first ID whereby I assume it converts the array into string.</p>
  
  <p><code>$key</code> also holds the value 1,2 in an array shown below:</p>
  
  <pre><code>$a=$data['sub'];
  
  $key0=array();
  foreach($a as $v=&gt;$k) 
    {
  
      $key0[]=$v;
  
    }
  
   $key2=implode(',',$key0);
   $key = array($key2);
  </code></pre>
  
  <p>How do I make the PDO understand <code>$key</code> holds an array value and not a string?</p>