write a function which decodes a URL-encoded string into an associative array. If there are two parameters with same name, the value should be stacked as an array.
For example, the string
a=1&b=2&a=hello&apple=9&apple=digital
would be converted to the associative array:
array( 'a' => array(1,'hello'), 'b'=> 2, 'apple' => array(9,'digital') )
Consider using
Map<String, ArrayList<String>>For example: