public static function withoutNested(array $flat, $separator = '.')
    {
        $root = [];

        foreach ($flat as $key => $value) {
            if (strpos($key, $separator) === false && !is_array($value)) {
                $root[$key] = $value;
            }
        }

        return $root;
    }
public static function withoutNested(array $flat, $separator = '.')
    {
        $root = [];

        foreach ($flat as $key => $value) {
            if (strpos($key, $separator) === false && !is_array($value)) {
                $root[$key] = $value;
            }
        }

        return $root;
    }
public static function withoutNested ( array $ flat , $ separator = '.' ) { $ root = [ ] ; foreach ( $ flat as $ key => $ value ) { if ( strpos ( $ key , $ separator ) === false && ! is_array ( $ value ) ) { $ root [ $ key ] = $ value ; } } return $ root ; }
Removes all "nested" arrays from a flat array.

@param array  $flat
@param string $separator

@return array
Removes all nested arrays from a flat array .