diff options
author | friendica <info@friendica.com> | 2012-06-14 17:39:17 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-14 17:39:17 -0700 |
commit | 8c94fa23bfebf6d6b9930ed83a86e9cdae55d28f (patch) | |
tree | 3be6ca812b7c1459d09901d41606776d0279de27 /boot.php | |
parent | 2efee75557bafc32b20be1cceac047fdeea3bb71 (diff) | |
parent | 244d7f9a8f3921d4c15812ce6f57a2c0e882e2fa (diff) | |
download | volse-hubzilla-8c94fa23bfebf6d6b9930ed83a86e9cdae55d28f.tar.gz volse-hubzilla-8c94fa23bfebf6d6b9930ed83a86e9cdae55d28f.tar.bz2 volse-hubzilla-8c94fa23bfebf6d6b9930ed83a86e9cdae55d28f.zip |
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1577,3 +1577,30 @@ function zrl($s,$force = false) { return $s . $achar . 'zrl=' . urlencode($mine); return $s; } + +/** +* returns querystring as string from a mapped array +* +* @param params Array +* @return string +*/ +function build_querystring($params, $name=null) { + $ret = ""; + foreach($params as $key=>$val) { + if(is_array($val)) { + if($name==null) { + $ret .= build_querystring($val, $key); + } else { + $ret .= build_querystring($val, $name."[$key]"); + } + } else { + $val = urlencode($val); + if($name!=null) { + $ret.=$name."[$key]"."=$val&"; + } else { + $ret.= "$key=$val&"; + } + } + } + return $ret; +} |