title: Google chart json issue
body: <p>Help me to solve this issue , </p>
  
  <pre><code>$sql=mysql_query("select t1.LOGIN,t1.BALANCE,t2.PROFIT from table2 t2 LEFT JOIN table1 t1 on t2.CLOSE_TIME = '1985-11-01 00:00:00' where (t2.CMD=4 or t2.CMD=6 ) AND t2.LOGIN=t1.LOGIN  ") or die(mysql_query());
  $table = array();
  $table['cols'] = array(
      array('label' =&gt; 'No Acc', 'type' =&gt; 'string'),
      array('label' =&gt; 'Profit', 'type' =&gt; 'number'),
      array('label' =&gt; 'Loss', 'type' =&gt; 'number')
  );
  $p=0;
  $l=0;
  $profit=0;
  $loss=0;
  $rows = array();
  while($r=mysql_fetch_array($sql))
  {
          if($r[PROFIT]&gt;0)
          {
          $p=$p+1;
          $profit=$profit+$r[PROFIT];
          }
          else if($r[PROFIT]&lt;=0)
          {
          $l=$l+1;
          $loss=$loss+$r[PROFIT];
          }
  }
      $noacc=$p+$l;
      $temp = array();
      $temp[] = array('v' =&gt; (int) $noacc);
      $temp[] = array('v' =&gt; (int) $p);
       $temp[] = array('v' =&gt; (int) $l);
      $table['rows'] = $rows;
  $jsonTable = json_encode($table);
  echo $jsonTable;
  </code></pre>
  
  <p>I get the following type of json code </p>
  
  <pre><code>{"cols":[{"label":"No Acc","type":"string"},{"label":"Profit","type":"number"},{"label":"Loss","type":"number"}],"rows":[{"c":[{"v":1199},{"v":261},{"v":938}]}]}
  </code></pre>
  
  <p>i use the following google chart code </p>
  
  <pre><code>&lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);
  
  function drawChart() 
  {
      var jsonData = $.ajax({
          url: "cjson.php",
          dataType:"json",
          async: false
  }).responseText;
  
  // Create our data table out of JSON data loaded from server.
  var data = new google.visualization.DataTable(jsonData);
  
  var options = {'title':'Ticket Sales',
  'width':500,
  'height':400};
  
  // Instantiate and draw our chart, passing in some options.
   var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
        chart.draw(data, options); 
  }
  &lt;/script&gt;
  &lt;?
  //  PrintHeader($buf,$username,$userid,$session);
  
    echo("&lt;div id='chart_div'&gt;&lt;/div&gt;");
  ?&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Finally When I load the page in my browser just shows the value 1199 value only in the chart ,Any example would help! Thank you. </p>