src/Models/Config.php
protected static function buildArrayPath($map, $value, &$array)
    {
        $key = array_shift($map);
        if (count($map) !== 0) {
            $array[$key] = [];
            self::buildArrayPath($map, $value, $array[$key]);
        } else {
            $array[$key] = $value;
        }
    }
protected static function buildArrayPath($map, $value, &$array)
    {
        $key = array_shift($map);
        if (count($map) !== 0) {
            $array[$key] = [];
            self::buildArrayPath($map, $value, $array[$key]);
        } else {
            $array[$key] = $value;
        }
    }
protected static function buildArrayPath ( $ map , $ value , & $ array ) { $ key = array_shift ( $ map ) ; if ( count ( $ map ) !== 0 ) { $ array [ $ key ] = [ ] ; self :: buildArrayPath ( $ map , $ value , $ array [ $ key ] ) ; } else { $ array [ $ key ] = $ value ; } }
This inserts a value into an array at a point in the array path.

### Example

<code>
$map = [1, 2];
$value = 'hello';
$array = [];

buildArrayPath($map, $value, $array);
// $array is now [1 => [2 => 'hello']]
</code>

@param array $map
@param mixed $value
@param $array
@return void
This inserts a value into an array at a point in the array path .