大約有 1 項符合查詢結(jié)果。(搜索耗時:0.0012秒)
- 淺談json_encode用法
- 1.從數(shù)據(jù)庫中查詢出來的數(shù)據(jù),放在數(shù)組中 代碼如下: $query=mysql_query($SQL); while($row = mysql_fetch_array($query)){ $xdata[]=$row['EventDate']; $ydata[]=intval($row['data']); } 2.將數(shù)據(jù)轉(zhuǎn)成json 代碼如下: $data_arr=array($xdata,$ydata) json_encode($
- 2015-03-07 21:08:58