Columns get added all with one statement. For example:
$sql = "INSERT INTO tab (col1, col2, col3) VALUES (E'" . pg_escape_string($col1_data) . "', E'" . pg_escape_string($col2_data) . "', E'" . pg_escape_string($col3_data) . "')";
If you need to add multiple rows, then you should use a loop for that. Just not for the columns (at least not normally)