title: charts labels and data with php arrays
body: <p>When I pass the array as an argument to the chart it stops showing on the web 
    page.</p>
  
  <pre><code>&lt;?php
  $f = fopen("C:\wamp64\www\dashb\CSV\salespermonthdollars.csv", "r");
  $labels = array();
  $data = array();
  $loopCounter = 0;
  while (($line = fgetcsv($f)) !== false) {
    if($loopCounter == 0){
      // this if is to skip the first row or the columns
    } else {
      array_push($labels,$line[0]);
      array_push($data,$line[1]);
    }
    $loopCounter = $loopCounter + 1; 
  }
  fclose($f); 
  ?&gt;
  </code></pre>
  
  <p>So above I read the csv file that I save from my query result and try to plot it on a chart:</p>
  
  <pre><code>&lt;canvas id="myChart2"&gt;
  &lt;script&gt;
  $array3 = [1,2,3,4,5,5,41]; 
  $array4 = [1,2,3,4,5,5,41];
  var ctx = document.getElementById('myChart2').getContext('2d');
  var myBarChart = new Chart(ctx, {
      type: 'bar',
      data: {
      labels: $array3, //when i change this to $labels doesn't work same for4
      datasets: [{
        label: 'label',
        data: $array4,
        backgroundColor: "rgba(100,255,51,0.4)"
       }]
    }
      });
  &lt;/script&gt;
  &lt;/canvas&gt;
  </code></pre>
  
  <p>Mainly I am displaying query result on a chart. I execute, save to csv and read<br>
  from there. </p>
  
  <p>Any suggestions for improvement in the approach are welcome, somehow I feel it could be done easier than this. </p>