SELECT * FROM table WHERE textcol NOT IN $1;
ERROR: syntax error at or near "$1"
$1 is sent as an array of strings from the application. Parameterized query. pglib. PHP.
Not sure how your PHP lib handles arrays, but the correct Pg syntax for
IN certainly requires parentheses.
You probably want the query to look more like:
SELECT * FROM table WHERE textcol NOT IN ($1);