GuzzleHttpPsr7parse_query

Parse a query string into an associative array.

Description

(array) GuzzleHttp\Psr7\parse_query( (string) $str, (constant) $urlEncoding = true ); 

If multiple values are found for the same key, the value of that key value pair will become an array. This function does not parse nested PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will be parsed into ['foo[a]' => 1,, foo[b] => 2]).

Returns (array)

Parameters (2)

0. $str (string)
Query string to parse
1. $urlencoding (constant)
How the query string is encoded

Usage

  1. if ( !function_exists( 'GuzzleHttp\Psr7\parse_query' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Psr7/functions.php'; 
  3.  
  4. // Query string to parse 
  5. $str = ''; 
  6.  
  7. // How the query string is encoded 
  8. $urlencoding = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = GuzzleHttp\Psr7\parse_query($str, $urlencoding); 
  12.  

Defined (1)

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

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