Builds a URL query based on an associative or indexed array.
Description
This is a convenient function for easily building URL queries.It sets the separator to '&' and uses the _http_build_query() function. Unlike PHP's native http_build_query(), this function does NOT URL-encode the keys or values. Callers are responsible for encoding values beforehand with urlencode() or rawurlencode(), or late-escaping the output with esc_url() before use.
Parameters
$dataarray
Array of key/value pairs to build the query from.
Return
string
Query string, without URL encoding applied.
Uses · 1
_http_build_query()From php.net (modified by Mark Jaquith to behave like the native PHP5 function).
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.