title: Postgresql Select rows where column = array
body: <p>This is a summary of what I am trying to do:</p>
  
  <pre><code>$array[0] = 1;
  $array[1] = 2;
  
  $sql = "SELECT * FROM table WHERE some_id = $array"
  </code></pre>
  
  <p>Obviously, there are some syntax issues, but this is what I want to do, and I haven't found anything yet that shows how to do it.</p>
  
  <p>Currently, my plan is to do something along these lines:</p>
  
  <pre><code>foreach($idList as $is)
      $where .= 'some_id=' . $id . ' OR';
  endforeach
  
  $sql = "SELECT * FROM table WHERE " . $where;
  </code></pre>
  
  <p>So is there support in PostgreSQL to use an array to search, or do I have to do something similar to my solution?</p>