Skip to content

Kirby 5.1.2

$options->nth()

Returns the nth element from the collection

$options->nth(int $n): Kirby\Option\Option|null

Parameters

Name Type Default
$nrequired int no default value

Return types

Kirby\Option\Optionornull

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

Parent class

Kirby\Option\Options inherited from Kirby\Toolkit\Collection