# $productList->chunk()

> Splits the collection into chunks of the same size. Returns a new collection with an element for each chunk and a sub collection in each chunk. The last chunk may be smaller.

- Source: `src/Toolkit/Collection.php#L156` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Toolkit/Collection.php#L156>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$productList->chunk(int $size): Kirby\Toolkit\Collection
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$size` | `int` | `–` |

## Return type

`Kirby\Toolkit\Collection`

## Parent class

`Wagnerwagner\Merx\ProductList` inherited from `Kirby\Toolkit\Collection`
