Requests_Response_Headers::flatten( string|array $value )

Flattens a value into a string


Description Description

Converts an array into a string by imploding values with a comma, as per RFC2616’s rules for folding headers.


Parameters Parameters

$value

(string|array) (Required) Value to flatten


Top ↑

Return Return

(string) Flattened value


Top ↑

Source Source

File: wp-includes/Requests/Response/Headers.php

	public function flatten($value) {
		if (is_array($value)) {
			$value = implode(',', $value);
		}

		return $value;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.