Requests::flatten( array $array )

Convert a key => value array to a ‘key: value’ array for headers

Parameters Parameters


(array) (Required) Dictionary of header values

Top ↑

Return Return

(array) List of headers

Top ↑

Source Source

File: wp-includes/class-requests.php

	public static function flatten($array) {
		$return = array();
		foreach ($array as $key => $value) {
			$return[] = sprintf('%s: %s', $key, $value);
		return $return;

Top ↑

User Contributed Notes User Contributed Notes

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