title: Passing an assoc array value to Ajax in PHP MySQL
body: <p>Actually I am trying to do a graph chart for all reports for that am using jQChart plugins. I have done the graph report by PHP but my head need that report with animation so I go to jQChart but I don't know how to pass the assoc array values to Ajax.</p>
  
  <pre><code>$results = mysql_query("SELECT vaccum_value,date FROM vaccum_details where serial_number='10P1005'");
  $data1=array();
  while ($row = mysql_fetch_array($results)) 
  {
      $data1[$row['date']]=$row['vaccum_value'];
  }  
  
  $data = Array ( "28-Sep-2012" =&gt; 31.6, "04-Oct-2012" =&gt; 0.99, "03-Oct-2012" =&gt; -3 ); 
  </code></pre>
  
  <p>but I need to pass this result to Ajax and then convert to like this below:</p>
  
  <blockquote>
    <p>data: [['28-Sep-2012', 31.6], ['04-Oct-2012', 0.99], ['03-Oct-2012', -3]]</p>
  </blockquote>
  
  <p>Detailed Script for your reference: </p>
  
  <pre><code>&lt;script lang="javascript" type="text/javascript"&gt;
  $(document).ready(function () { 
  $('#jqChart').jqChart({ title: { text: 'Animation' }, animation: { delayTime: 1, duration: 2 }, series: [ { type: 'line', title: 'Line', data: [['A', 69], ['B', 57], ['C', 86], ['D', 23], ['E', 70], ['F', 60], ['D', 88], ['H', 22]] } ] }); }); 
  &lt;/script&gt;
  </code></pre>