花括号中的json数据--->转为数组array

//正式服务器 更换航班
public function changef(){
$str =
'{"airportTax":50,"arriModifyTime":"","arriTime":"0935","codeShare":false,"depTime":"0625","dstCity":"CTU","dstJetq
uay":"T1","flightNo":"3U8548","fuelTax":0,"isElectronicTicket":true,"link":"DS#","meal":"true","orgCity":"PEK","org
Jetquay":"T3","param1":"2016-09-06","param2":"0.0","param3":"0.0","planeType":"321","seatItems":
{"discount":1,"flightNo":"3U8548","parPrice":1690,"param2":"3","policyData":{"comment":"B2B电子客票请不要做RR,否则
可能无法出票。 B2B客票出票成功后需要改期,切忌勿动原编码可直接提交改期申请,否则可能导致改期不成功br
","commisionMoney":25.01,"commisionPoint":"-
0.2","commisionType":0,"policyBelongTo":2,"policyId":162776962,"policyType":"B2B","seatType":1,"vtWorkTime":"08:00
-23:56","workTime":"00:00-23:59"},"seatCode":"Y","seatMsg":"经济
舱","seatStatus":"A","seatType":1,"settlePrice":1669},"shareNum":"","stopnum":0}';

$str = json_decode($str,true);
echo '<meta http-equiv="Content-type" content="text/html:charset=utf-8">';
echo '<pre>';
var_dump($str);
}

原文地址:https://www.cnblogs.com/bj-tony/p/5670735.html