title: How do i select multiple rows which match the value of an item in an array?
body: <p>I have written a php script that returns an arbitrary number of specific ids (which are in the format of numbers) in an array. I would like to make a new query that selects each row from a table that belongs to each id. I know i can do 1 query to get one row with the matching id. But i would like to do this all in one query. Here is my code:</p>
  
  <pre><code>$id = array(1,4,7,3,11,120); // The array containing the ids
  
  $query = mysql_query("SELECT * 
                          FROM posts 
                         WHERE id = '$id[0]'"); 
  // I would like to Do this for each id in the array and return it as one group of rows.`
  </code></pre>