Note that if you are preparing a query with an in clause with a list of items, you will need to prepare each item separately.
$result = pg_prepare($dbconn, "my_query", 'SELECT * FROM shops WHERE name IN($1,$2,$3)');
$result = pg_execute($dbconn, "my_query", array("coffee", "beer", "hard"));
This means that you can't just prepare a query with an arbitrary in() list.