As table name you can also specify columns you want imported.
Will import all columns:
<?php
pg_copy_from($db, 'cpm.ics', $rows);
?>
Will import only specified columns:
<?php
pg_copy_from($db, 'cpm.ics (type, product, date, count, amount)', $rows);
?>