What is the difference between the quotes \" and \' ? What about `? Is there an error in using different quotes \' and \" below?
$result = pg_query_params($
The difference between single and double quoted strings is well explained in the PHP manual about Strings.
In your example, since you are using substitution variables such as $1 that mean something specific to pg_query_params and that you do not want PHP to interpret as variable names, you should use single quotes for your SQL query strings.