Skip to content

Kirby 5.0.4

$collection->remove()

Removes an element from the array by key

$collection->remove(string $key): Kirby\Toolkit\Collection

Parameters

Name Type Default Description
$keyrequired string no default value the name of the key

Return type

Kirby\Toolkit\Collection

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

Parent class

Kirby\Toolkit\Collection