这一个数据怎样解析
";print_r($data);exit();<br> return $data;<br> }<br> <br> 在浏览器里找打开连接是这样的。<br> <br> <pre class="brush: Java">SINAFINANCE132436359014192800(({data:[{og_id:"1061971",contest_id:"8",sid:"2096647540",StockCode:"sz002230",StockName:"科大讯飞",SellBuy:"0",OrderPrice:"34.700",DealAmount:"4200",OrderAmount:"4200",IfDealt:"1",OrderTime:"2011-10-25 09:58:44",mtime:"2011-10-25 09:58:44",remark:""}],count:"100"}))
<script><br /> function SINAFINANCE132436359014192800(v) {<br /> for(t in v) {<br /> if(typeof(v[t]) == 'object') SINAFINANCE132436359014192800(v[t])<br /> document.write(t + ':'+v[t]+'<br>');<br /> }<br /> }<br /> <br /> SINAFINANCE132436359014192800(({data:[{og_id:"1061971",contest_id:"8",sid:"2096647540",StockCode:"sz002230",StockName:"科大讯飞",SellBuy:"0",OrderPrice:"34.700",DealAmount:"4200",OrderAmount:"4200",IfDealt:"1",OrderTime:"2011-10-25 09:58:44",mtime:"2011-10-25 09:58:44",remark:""}],count:"100"}))<br /> </script>显示
$s =<<< JSON<br /> {data:[{og_id:"1061971",contest_id:"8",sid:"2096647540",StockCode:"sz002230",StockName:"科大讯飞",SellBuy:"0",OrderPrice:"34.700",DealAmount:"4200",OrderAmount:"4200",IfDealt:"1",OrderTime:"2011-10-25 09:58:44",mtime:"2011-10-25 09:58:44",remark:""}],count:"100"}<br /> JSON;<br /> $s = iconv('gbk', 'utf-8', $s);<br /> $s = preg_replace('/(\w+[a-z]):/i', '"$1":', $s);<br /> print_r(json_decode($s));显示
stdClass Object<br> (<br> [data] => Array<br> (<br> [0] => stdClass Object<br> (<br> [og_id] => 1061971<br> [contest_id] => 8<br> [sid] => 2096647540 <div class="clear"> </div>