php给数组key:value中的key加引号
public function Ext_json_decode($str, $mode=false){
if(preg_match('/\w:/', $str)){
$str = preg_replace('/(\w+):/is', '"$1":', $str);
}
return json_decode($str, $mode);
}
$httpstr = http($url, $data,'POST', array("Content-type: application/x-www-form-urlencoded; charset=utf-8"));
echo http_build_query($data);
打印$httpstr组成的字符串