PHP将字符串“¬e=”转换为“¬e=”

时间:2013-12-21 14:13:07

标签: php json urlencode

$to= array();
foreach($users as $v) {
    $to[(string)$v['address']] = (float)($v['amount']*100000);  
}

$guid            = "user";
$main_password   = "pw";
$second_password = "pw2";
$fee             = 60000;
$recipients  = urlencode(json_encode($to));
$from            = "address";
$note            = "public";

$json_url = "https://blockchain.info/merchant/$guid/sendmany?password=".$main_password."&second_password=".$second_password."&recipients=".$recipients."&shared=false&fee=".$fee."&note=".$note."&from=".$from;

echo $json_url;
die();

出于某种原因,当我echo $json_url;时,&note=会转换为¬e=。我找不到任何可以进行转换的PHP或HTML符号。

1 个答案:

答案 0 :(得分:3)

那是¬,或¬(数学不是)。如果您使用的是HTML,请始终使用&来回显&符号(即使在URL中)。浏览器容忍草率编码,但在这种情况下它可以咬你。