PDO不支持绑定数组。
要么别用绑定了,
$ids = array(2344, 5523, 9332);
// 过滤ids略
$in = implode(',',$ids);
$st = $pdo->prepare('SELECT * FROM table_name WHERE id IN ('.$in.')');
$st->execute();
如果你坚持用绑定或许只能这样
$ids = array(2344, 5523, 9332);
// 自动构造多个?号略
$st = $pdo->prepare('SELECT * FROM table_name WHERE id IN (?,?,?)');
foreach ($ids as $k => $id)
$st->bindValue(($k+1), $id);
$st->execute();