# Retrieve Params into Ordered Map > [HTML Version](retrieveparams.htm) _Updated February 2015_ **xcall CGIUTL, CGIOP\_GETPARARY, status, \$ary() \{,string\}** _Opcode_ 12, CGIOP\_GETPARARY, retrieves the entire set of name=value pairs into an ordered map (aka associative array) **Parameters** _status _ ([Num](num.htm.md)) \[out\] Returns the number of name=value pairs loaded. 0 indicates either that no name=value pairs were passed into the CGI request. _\$ary()_ (Ordered map) \[out\] An associative array to be loaded with the name=value pairs. It should be declared as follows: dimx \$ary, ordmap(varstr;varstr) As with other parameters, you can name the array as you like, but you must specify the empty parentheses as in the example. This is special code to the subroutine to treat the parameter as an entire array, rather than as just one element. Also note that any existing contents of the array will not be automatically cleared, although any conflicting name=value pairs will be replaced. If reusing the array for multiple requests, you should probably use [.CLEAR](clear_asb.htm.md) to clear it. _string _([String](string.htm.md)) \[in\] If specified, the string parameter should contain the list of name=value pairs making up the request; see CGIOP\_STDIN. Otherwise the request is taken directly from the stdin passed to the program by the web server. **Comments** The form of the request, whether in _string_ or in stdin, should be: name1=value1\&name2=value2\&...\&nameN=valueN **Examples ** For example, if assuming _string_ = "fromCurrency=US\&toCurrency=Euro", the following code... dimx \$req, ordmap(varstr;varstr) xcall CGIUTL, CGIOP\_GETPARARY, status, \$req(), stdin\$ print "fromCurrency = "; \$req("fromCurrency") will print: fromCurrency = US toCurrency = Euro Or you can use a FOREACH loop to retrieve all of the name=value pairs without knowing in advance what to expect, i.e. foreach \$\$i in \$req() switch .key(\$\$i) case "toCurrency" tocurr\$ = \$\$i exit case "fromCurrency" fromcurr\$ = \$\$i exit ... endswitch next \$\$i