开发者

How can I insert a character in this array

开发者 https://www.devze.com 2023-02-25 09:15 出处:网络
foreach ($_GET as $key=>$value) { echo \"$key=\".urldecode($value).\"<br/>\"; } the result is: id=http://google.com/?var=234
foreach ($_GET as $key=>$value) {
  echo "$key=".urldecode($value)."<br/>";
}

the result is:

id=http://google.com/?var=234
k=234
ks=333

How can I insert the "&" in this array so it would output like this.

$param = "id=http://google.com/?var=234&k=234&ks=33开发者_如何转开发3";


Use http_build_query()

echo http_build_query($_GET);
0

精彩评论

暂无评论...
验证码 换一张
取 消