diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2012-06-14 10:04:13 -0400 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2012-06-14 10:04:13 -0400 |
commit | f66ae301b8ff154e009afd02258551787cae683c (patch) | |
tree | 9e404e7c545cc73b1db6f4feadf702de6fa07723 /boot.php | |
parent | 2f5e891cd174c6314f3ba5c31f9672595462a22c (diff) | |
download | volse-hubzilla-f66ae301b8ff154e009afd02258551787cae683c.tar.gz volse-hubzilla-f66ae301b8ff154e009afd02258551787cae683c.tar.bz2 volse-hubzilla-f66ae301b8ff154e009afd02258551787cae683c.zip |
network: fix bug #453
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; +} |