title: HighCharts pie chart X-axies values are not displayed while trying to get data from MySQL database using PHP
body: <p>I am stuck at data connect from mysql database to HighCharts</p>
  
  <p><em>highchart.js</em> code below </p>
  
  <pre><code>            &lt;script type="text/javascript"&gt;
      $(function () {
          var chart;
          $(document).ready(function() {
              chart = new Highcharts.Chart({
                  chart: {
                      renderTo: 'container5',
                      plotBackgroundColor: null,
                      plotBorderWidth: 2,
                      plotShadow: false
                  },
                  title: {
                      text: '&lt;p&gt;&lt;?php echo $chart5; ?&gt;&lt;/p&gt;'
                  },
                  // tooltip: {
                      // pointFormat: '{series.name}: &lt;b&gt;{point.percentage}%&lt;/b&gt;',
                      // percentageDecimals: 1
                  // },
                 plotOptions: {
                      pie: {
                          allowPointSelect: true,
                          cursor: 'pointer',
                          dataLabels: {
                              enabled: false
                          },
                          showInLegend: true
                      }
                  },
  
  
                      xAxis: {
               categories: [&lt;?php echo "'".implode("','",$data)."'"; ?&gt;]
            },
            series: [{
             type: 'pie',
               data: [&lt;?php echo implode(",",$data1);  ?&gt;] 
  
                  }]
              });
          });
  
      });
  
          &lt;/script&gt;
  </code></pre>
  
  <p>and my <em>database.php</em>:</p>
  
  <pre><code>            $data = array();
          $sql = "SELECT x_axis FROM licence_chart ";
           $result9 = mysql_query($sql);
                  $data9 = array();
                  while ($row = mysql_fetch_array($result9)) {
                     $data9 = $row['x_axis'];
                     $data[] = $data9;
                  }
  
          $data1 = array();
          $sql = "SELECT y_axis FROM licence_chart ";
           $result10 = mysql_query($sql);
                  $data10 = array();
                  while ($row = mysql_fetch_array($result10)) {
                     $data10 = $row['y_axis'];
                     $data1[] = $data10;
                  }
  
                  echo "'".join("','",$data)."'";
                  echo join(",",$data1);
  </code></pre>
  
  <p>when I run this code in localhost then pie chart shows but in <code>x-axies</code>  values are not shown 
  that values are shown like <code>Slice</code> .but <code>y-axies</code> value are display correctly , </p>
  
  <p>in <code>licence_chart</code> table data like this in table <code>x_axies</code>, <code>y_axies</code> are columns </p>
  
  <pre><code>x_axies{crome,opera,ie,firefox,safari}
  y_axies{0.12,0.23,23.2,56.2,2}
  </code></pre>
  
  <p>i want in<code>highchart.js</code> file in <code>data[]</code>
  data will come  like this </p>
  
  <blockquote>
    <p><code>['safari',10],</code> <code>['firefox',1.5],</code>['ie',0.5]</p>
  </blockquote>
  
  <p>so What am I doing wrong in <code>database.php</code> and <code>highchatr.js</code> file please tell me and correct my code . </p>