title: Draw piechart with highcharts using php array of data
body: <p>I want to replace PHP array <code>$os_array</code> with JavaScript variable to send with different values. Like as <code>var x =&lt;?php echo $os_array; ?&gt;; drawcharts($x);</code> when alert <code>var x</code> result will be <code>['Internet Explorer 7',1],['Internet Explorer 8',1],['Outlook 2007',2]</code></p>
  
  <pre><code>var x="&lt;?php echo $os_array;?&gt;";
  drawcharts(x);
  function drawcharts(x){
      $('#_shared_graphs').highcharts({
          chart: {
              plotBackgroundColor: null,
              plotBorderWidth: null,
              plotShadow: false,
              backgroundColor: '#f1f1f1'
          },
          title: {
              text: 'OS'
          },
          tooltip: {
              pointFormat: '{point.y} Using &lt;b&gt;{point.name}'
          },
          plotOptions: {
              pie: {
                  allowPointSelect: true,
                  cursor: 'pointer',
                  dataLabels: {
                      enabled: true,
                      format: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %',
                      style: {
                          color: (Highcharts.theme &amp;&amp; Highcharts.theme.contrastTextColor) || 'black'
                      }
                  }
              }
          },
          series: [{
                  type: 'pie',
                  name: 'Sent Messag stat',
                  data: [x]
              }]
      });
  }
  </code></pre>