title: how to create a bar chart with php data variables
body: <p>I am creating a bar chart using chart.js however the values i want in the bar chart is a php array, one array for the values and one array for the labels. How do i add these arays to the bar chart. Currently I have this for the data for the bar chart:</p>
  
  <pre><code>ar barData = {
  labels : ["January","February","March","April","May","June"],
  datasets : [
      {
          fillColor : "#48A497",
          strokeColor : "#48A4D1",
          data : [456,479,324,569,702,600]
      }
  
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>I tried to do the following, but it still did not work: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
     var chartLabels= &lt;?php echo $chartLabels; ?&gt;
     var chartValues= &lt;?php echo $chartValues; ?&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I would like to replace the 'labels' with a php array, as well as the 'data'</p>