Home > Backend Development > PHP Tutorial > json_encode usage_PHP tutorial

json_encode usage_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-20 11:15:36
Original
948 people have browsed it

$query=mysql_query($SQL);
 while($row = mysql_fetch_array($query)){
        $xdata[]=$row['EventDate'];
         $ydata[]=intval($row['data']);
    }

  $data_arr=array($xdata,$ydata)

  json_encode($data_arr);

 

$.ajax({
   type: "Get",  
   url: "columndata.php?r=" + Math.floor(Math.random() * 1000 + 1),
   data: { 'BeginTime': "" + beginTime + "", "EndTime": "" + endTime + "" , "keyword": "" + keyword + "" },
   dataType: "text",  
   global: false, 
   async: false,  
   success: function (strReult) {
    if (strReult == "-1") { alert("fail!"); return; }
            
 


   },
   error: function () {
    alert("fail!");
   }
  });

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440196.htmlTechArticle$query=mysql_query($SQL); while($row = mysql_fetch_array($query)){ $xdata[]=$row['EventDate']; $ydata[]=intval($row['data']); } $data_arr=array($xdata,$ydata) json_encode($data_a...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Backslash present in Json
From 1970-01-01 08:00:00
0
0
0
Get: Transfer JSON data
From 1970-01-01 08:00:00
0
0
0
mysql storage json error
From 1970-01-01 08:00:00
0
0
0
javascript - Problems with displaying json data
From 1970-01-01 08:00:00
0
0
0
Find matching integers in JSON.
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template