PostgreSQL PREPARE query with IN () parameters
Use an array to represent the series of values:

pg_prepare($con, "prep", "select * from test where tid=ANY($1::int[])");

$strpar = "{3,4,6,8,10}";
pg_execute($con, "prep", array($strpars));


The cast to int[] in the query might even be superfluous if the planner is able to infer the type by itself.