public static function arrayUnflattenDotNotation($array, $separator = '.')
    {
        $newArray = [];
        foreach ($array as $key => $value) {
            $dots = explode($separator, $key);
            if (\count($dots) > 1) {
                $last = &$newArray[$dots[0]];
                foreach ($dots as $k => $dot) {
                    if ($k === 0) {
                        continue;
                    }
                    $last = &$last[$dot];
                }
                $last = $value;
            } else {
                $newArray[$key] = $value;
            }
        }

        return $newArray;
    }
public static function arrayUnflattenDotNotation($array, $separator = '.')
    {
        $newArray = [];
        foreach ($array as $key => $value) {
            $dots = explode($separator, $key);
            if (\count($dots) > 1) {
                $last = &$newArray[$dots[0]];
                foreach ($dots as $k => $dot) {
                    if ($k === 0) {
                        continue;
                    }
                    $last = &$last[$dot];
                }
                $last = $value;
            } else {
                $newArray[$key] = $value;
            }
        }

        return $newArray;
    }
public static function arrayUnflattenDotNotation ( $ array , $ separator = '.' ) { $ newArray = [ ] ; foreach ( $ array as $ key => $ value ) { $ dots = explode ( $ separator , $ key ) ; if ( \ count ( $ dots ) > 1 ) { $ last = & $ newArray [ $ dots [ 0 ] ] ; foreach ( $ dots as $ k => $ dot ) { if ( $ k === 0 ) { continue ; } $ last = & $ last [ $ dot ] ; } $ last = $ value ; } else { $ newArray [ $ key ] = $ value ; } } return $ newArray ; }
Opposite of flatten, convert flat dot notation array to multi dimensional array

@param array $array
@param string $separator
@return array
Opposite of flatten convert flat dot notation array to multi dimensional array