答案 0 :(得分:0)
您可以通过两种方式完成:
<强>首先强>
json encode
double PreEnCol() {
if (marca == 1)
return (105.000*562);
else if (marca == 2)
return (65.000*562);
else if (marca == 3)
return (54.000*562);
else if (marca == 4)
return (125.000*562);
else if (marca == 5)
return (129.000*562);
else if (marca == 6)
return (85.900*562);
}
string toString(){
stringstream s;
s << endl;
s << std::fixed << std::setprecision(1) << "Precio en colones: "<<PreEnCol() << endl;
return s.str();
}
回归时
base64 decode
$ decoding_html = base64_decode(json_decode($ encoded_html));
<强>第二强>
只需键和值对即可。
$html = "Random HTML String"; //Use addslashes if problem creating string
$encoded_html = json_encode(base64_encode($html));