title: MySQL and PHP: how to fetch multiple ID's in an array containing the ID's
body: <p>I have multiple ID's stored in a variable. This array can become long (+400 ID's). How do I fetch the data from these ID's in MySQL (PDO)?<br>
  I could do it via this:<br></p>
  
  <pre><code>"select * from info WHERE `id` IN ('1,2,3,4,5')"
  </code></pre>
  
  <p>But that's unsafe (SQL injection) and maybe not performant. Any suggestions to handle this problem?<br></p>