Skip to content

Kirby 5.0.0

$path->indexOf()

Tries to find the index number for the given element

$path->indexOf(string $needle): int|false

Parameters

Name Type Default Description
$needlerequired string no default value the element to search for

Return types

intorfalse

the index (int) of the element or false

Parent class

Kirby\Http\Path inherited from Kirby\Toolkit\Iterator