Skip to content

Kirby 5.0.4

$items->nth()

Returns the nth element from the collection

$items->nth(int $n): Kirby\Cms\Item|null

Parameters

Name Type Default
$nrequired int no default value

Return types

Kirby\Cms\Itemornull

This method modifies the existing $items object it is applied to and returns it again.

Parent class

Kirby\Cms\Items inherited from Kirby\Toolkit\Collection