When i convert my PHP array into a JSON array the first element of the array is empty and it's ",". Here is my code:
var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: **<?php echo json_encode($d_dates);?>**,
datasets: [{
......
I have checked the array in PHP is ok but when i convert it this occurs.