public function urlencode_array(array $ar) {
		$datastring = '';
		foreach ($ar as $key => $val) {
			if (!empty($datastring)) {
				$datastring .= '&';
			}
			$datastring .= urlencode($key).'='.urlencode($val);
		}
		return $datastring;
	}
public function urlencode_array(array $ar) {
		$datastring = '';
		foreach ($ar as $key => $val) {
			if (!empty($datastring)) {
				$datastring .= '&';
			}
			$datastring .= urlencode($key).'='.urlencode($val);
		}
		return $datastring;
	}
public function urlencode_array ( array $ ar ) { $ datastring = '' ; foreach ( $ ar as $ key => $ val ) { if ( ! empty ( $ datastring ) ) { $ datastring .= '&' ; } $ datastring .= urlencode ( $ key ) . '=' . urlencode ( $ val ) ; } return $ datastring ; }
Transforms an array of parameters into a  urlencoded request string.

@param array $ar An array of key=>val to encode and transform
@return string The urlencoded request string
Transforms an array of parameters into a urlencoded request string .