# Pdo\Pgsql::copyFromArray

(PHP 8 >= 8.4.0)

Pdo\Pgsql::copyFromArray — Copy data from a PHP array into a table

### Beschreibung

public Pdo\Pgsql::copyFromArray(
string `$tableName`,
array `$rows`,
string `$separator` = "\t",
string `$nullAs` = "\\\\N",
?string `$fields` = `null`
): bool

Copies data from `rows` array to table `tableName` using `separator` as fields delimiter and `fields` list.

### Parameter-Liste

`tableName`
  String containing table name.
`rows`
  An indexed array of strings with fields separated by `separator`.
`separator`
  Delimiter used to separate fields in an entry of the `rows` array.
`nullAs`
  How to interpret SQL `NULL` values.
`fields`
  List of fields to insert.

### Rückgabewerte

Gibt bei Erfolg `true` zurück. Bei einem Fehler wird `false` zurückgegeben.

### Siehe auch

- Pdo\Pgsql::copyToArray() - Copy data from database table into PHP array
- Pdo\Pgsql::copyFromFile() - Copy data from file into table
- Pdo\Pgsql::copyToFile() - Copy data from table into file

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open