src/Response/Response.php
private static function arrayFlatten($array, $prefix = '')
    {
        $result = array();
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $result = $result + self::arrayFlatten($value, $prefix . $key . '.');
            } else {
                $result[$prefix . $key] = trim(preg_replace('/\s+/', ' ', $value));
            }
        }
        return $result;
    }
private static function arrayFlatten($array, $prefix = '')
    {
        $result = array();
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $result = $result + self::arrayFlatten($value, $prefix . $key . '.');
            } else {
                $result[$prefix . $key] = trim(preg_replace('/\s+/', ' ', $value));
            }
        }
        return $result;
    }
private static function arrayFlatten ( $ array , $ prefix = '' ) { $ result = array ( ) ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ result = $ result + self :: arrayFlatten ( $ value , $ prefix . $ key . '.' ) ; } else { $ result [ $ prefix . $ key ] = trim ( preg_replace ( '/\s+/' , ' ' , $ value ) ) ; } } return $ result ; }
convert a multidimensional array into a simple one-dimensional array

@param array $array
@return array
convert a multidimensional array into a simple one - dimensional array