public static function expand($array)
    {
        $multiArray = [];

        foreach ($array as $key=>&$value)
        {
            $keys = explode('.', $key);
            $lastKey = array_pop($keys);
            $currentPointer = &$multiArray;

            foreach ($keys as $currentKey)
            {
                if (!isset($currentPointer[$currentKey]))
                {
                    $currentPointer[$currentKey] = [];
                }

                $currentPointer = &$currentPointer[$currentKey];
            }

            $currentPointer[$lastKey] = $value;
        }

        return $multiArray;
    }