GuzzleHttpPsr7build_query

Build a query string from an array of key value pairs.

Description

(string) GuzzleHttp\Psr7\build_query( (array) array $params, (constant) $encoding = PHP_QUERY_RFC3986 ); 

This function can use the return value of parse_query() to build a query string. This function does not modify the provided keys when an array is encountered (like http_build_query would).

Returns (string)

Parameters (2)

0. $params (array) => array $params
Query string parameters.
1. $encoding — Optional. (constant) => PHP_QUERY_RFC3986
Set to false to not encode, PHP_QUERY_RFC3986 to encode using RFC3986, or PHP_QUERY_RFC1738 to encode using RFC1738.

Usage

  1. if ( !function_exists( 'GuzzleHttp\Psr7\build_query' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Psr7/functions.php'; 
  3.  
  4. // Query string parameters. 
  5. $params = array(); 
  6. $encoding = PHP_QUERY_RFC3986; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = GuzzleHttp\Psr7\build_query($params, $encoding); 
  10.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Psr7/functions.php