pg_query_params() *does* accept NULLs. They will automatically be transformed, correctly, into SQL NULL. Thus, for example:
<?php
$sql = "UPDATE tbl_example SET column_a = $1, column_b=$2";
$params = array(NULL, 42);
$result = pg_params ($sql, $params);
$result = pg_query ("UPDATE tbl_example SET column_a = NULL column_b = '42')";
?>
Note that you can use NULLs this way in an UPDATE or INSERT statement, but NOT in a WHERE clause. This isn't a restriction of pg_query_params(), but rather it is a consquence of the SQL language.
So, if you want a query of the type:
<?php
$sql = "SELECT * from tbl_example WHERE column_a = $1 and column_b = $2";
$params = array(NULL, 42);
$result = pg_params ($sql, $params);
?>
This will fail as invalid SQL: because you should use "= 42" but "IS NULL". The solution is to use the SQL construct "IS [NOT] DISTINCT FROM".
<?php
$sql = "SELECT ... WHERE column IS NOT DISTINCT FROM $1"
$params = array (42); $params = array (NULL); ?>
(Aside: though this is annoying, the behaviour is correct. There is a postgresql compatibility option "transform_null_equals", but it won't help you here, even though you might expect it to.)