Reference

Guide

A::nestByKeys()

Recursively creates a nested array from a set of keys with a key on each level

A::nestByKeys(mixed $value, array $keys): array|mixed

Parameters

Name Type Default Description
$value mixed

Arbitrary value that will end up at the bottom of the tree

$keys array

List of keys to use sorted from the topmost level

Return type

array|mixed

Source code

kirby/src/Toolkit/A.php#L489