build_query() – Build URL query based on an associative and, or indexed array.

You appear to be a bot. Output may be restricted

Description

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

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

Usage

$string = build_query( $data );

Parameters

$data
( array ) required – URL-encode key/value pairs.

Returns

string URL-encoded string.

Source

File name: wordpress/wp-includes/functions.php
Lines:

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

 View on GitHub View on Trac