<code>//代码 foreach ( $data as $key => $value ) { $newData[$key] = urlencode ( $value ); } echo urldecode(json_encode($newData)); //显示 {"status":"1","method":"登陆","message":"成功"} </code>