I have and array with two values and I want to use it with sql IN operator in select query.
Here is the structure of my table
id comp_id 1 2 2 3
$arr is a php array, to the sql server you need to send a string that will be parsed you need to turn your array in a list like 1, 2, etc..
to do this you can use the function http://php.net/implode
so before running the query try
$arr = implode ( ', ', $arr);