<?php
$string='{
"fenxiao_products_ge_response": {
"total_results": 10,
"products": {
"fenxiao_product": [{
"pid": 1255,
"name": "jayzhou",
"productcat_id": 444,
"standard_price": "5",
"cost_price": "5",
"retail_price_low": "10.56",
"retail_price_high": "10.56",
"outer_id": 4444,
"quantity": 444,
"alarm_number": 444,
"pictures": "http://img01.taobaocdn.com/xxx.jpg,http://img01.taobaocdn.com/xxx.jpg",
"desc_path": "http://img03.taobaocdn.com/xxx.dpc",
"prov": "浙江",
"city": "杭州",
"postage_type": "12",
"postage_id": 5545,
"postage_ordinary": "10.56",
"postage_fast": "10.56",
"postage_ems": "12.2",
"have_invoice": true,
"have_guarantee": true,
"status": "up",
"items_count": 5,
"orders_count": 5,
"created": "2000-01-01 00:00:00",
"modified": "2000-01-01 00:00:00",
"skus": {
"fenxiao_sku": [{
"id": "jayzhou",
"name": "如鞋子的sku:“红色,35”",
"cost_price": "1",
"quantity": "1",
"outer_id": "1"
}]
}
}]
}
}
}
';
$array=(array)json_decode($string,true);
var_dump($array);
?>
求解 json_decode()函数无法处理该json字符串求各位大侠赐教 小弟万分感谢 !
$string='{
"fenxiao_products_ge_response": {
"total_results": 10,
"products": {
"fenxiao_product": [{
"pid": 1255,
"name": "jayzhou",
"productcat_id": 444,
"standard_price": "5",
"cost_price": "5",
"retail_price_low": "10.56",
"retail_price_high": "10.56",
"outer_id": 4444,
"quantity": 444,
"alarm_number": 444,
"pictures": "http://img01.taobaocdn.com/xxx.jpg,http://img01.taobaocdn.com/xxx.jpg",
"desc_path": "http://img03.taobaocdn.com/xxx.dpc",
"prov": "浙江",
"city": "杭州",
"postage_type": "12",
"postage_id": 5545,
"postage_ordinary": "10.56",
"postage_fast": "10.56",
"postage_ems": "12.2",
"have_invoice": true,
"have_guarantee": true,
"status": "up",
"items_count": 5,
"orders_count": 5,
"created": "2000-01-01 00:00:00",
"modified": "2000-01-01 00:00:00",
"skus": {
"fenxiao_sku": [{
"id": "jayzhou",
"name": "如鞋子的sku:“红色,35”",
"cost_price": "1",
"quantity": "1",
"outer_id": "1"
}]
}
}]
}
}
}
';
$array=(array)json_decode($string,true);
var_dump($array);
?>
求解 json_decode()函数无法处理该json字符串求各位大侠赐教 小弟万分感谢 !
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货