> For the complete documentation index, see [llms.txt](https://php-etl.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://php-etl.gitbook.io/docs/extractors/collection.md).

# Collection

Extracts data from any iterable item. It accepts arrays or traversables objects. The collection items must be associative arrays.

```php
$etl->extract('collection', $iterable, $options);
```

> **Tip:** Using generators will decrease memory usage.

## Options

### Columns

Columns from the iterable item that will be extracted.

| Type  | Default value |
| ----- | ------------- |
| array | `null`        |

```php
$options = ['columns' => ['id', 'name', 'email']];
```
