build_query( array $data )

Build URL query based on an associative and, or indexed array.


Description Description

This is a convenient function for easily building url queries. It sets the separator to ‘&’ and uses _http_build_query() function.

See also See also


Top ↑

Parameters Parameters

$data

(array) (Required) URL-encode key/value pairs.


Top ↑

Return Return

(string) URL-encoded string.


Top ↑

Source Source

File: wp-includes/functions.php

function build_query( $data ) {
	return _http_build_query( $data, null, '&', '', false );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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