/** @return string http query string
* @param array $requestData associative, of string, possibly nested, like $_REQUEST
* @param string $param to be used for creating nested multiple values: <param>[<key>]=<value>
*/
function ($requestData, $param=null) {
$keyValueSep = '=';
$paramSep = '&';
$params = array();
$cnv = $this->();
forEach($requestData as $key => $value) {
if ($param!==null)
$key = $param.'['. $key .']';
$params[] = is_array($value)
? $this->($value, $key)
: $cnv->($key). $keyValueSep. $cnv->($value);
}
return implode($paramSep, $params);
}
|