there are still 2 bugs:
1.
if you have a multidimensional array, this can be solved fast by json_encode()
but better would be a recursive function for it.
2.
if you use special chars in your array key like ä, ö, ï, ü, ...
urlencode is missing there too
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Last edit: Anonymous 2017-04-28
there are still 2 bugs:
1.
if you have a multidimensional array, this can be solved fast by json_encode()
but better would be a recursive function for it.
2.
if you use special chars in your array key like ä, ö, ï, ü, ...
urlencode is missing there too
better solution is
if(is_array($cur_val)) $cur_val=json_encode($cur_val);
// $postdata .= urlencode($key) ."[$cur_key]=". urlencode($cur_val)."&";
echo $postdata .= urlencode($key) ."%5B".urlencode($cur_key)."%5D=". urlencode($cur_val)."&";