Requests_Response_Headers::flatten

Advertisement

Summery Summery

Flattens a value into a string

Syntax Syntax

Requests_Response_Headers::flatten( string|array $value )

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

Return Return

(string) Flattened value

Source Source

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

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

		return $value;
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.