Used By
| Used By | Description |
|---|---|
| wp-includes/Requests/Response/Headers.php: Requests_Response_Headers::offsetGet() | Get the given header |
Flattens a value into a string
Converts an array into a string by imploding values with a comma, as per RFC2616’s rules for folding headers.
(string|array) (Required) Value to flatten
(string) Flattened value
File: wp-includes/Requests/Response/Headers.php
public function flatten($value) {
if (is_array($value)) {
$value = implode(',', $value);
}
return $value;
}
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_response_headers/flatten