flush
[mdref/mdref] / http / QueryString / __construct.md
1 # void http\QueryString::__construct([mixed $params = NULL])
2
3 Create an independent querystring instance.
4
5 ## Params:
6
7 * Optional mixed $params = NULL
8 The query parameters to use or parse.
9
10 ## Throws:
11
12 * http\Exception
13
14 ## Example:
15
16 $qs = new http\QueryString("foo=bar&a[]=1&a[]=2");
17 print_r($qs->toArray());
18
19 Would yield:
20
21 Array
22 (
23 [foo] => bar
24 [a] => Array
25 (
26 [0] => 1
27 [1] => 2
28 )
29
30 )