I use Chart.js to present my data.
var data_2 = {
datasets: [{
data: //print php var here,
backgroundColor: [
'#00c0ef',
'#f56954',
'#00a65a',
],
}],
};
I want to change my array format from something like
Array ( [jml] => 833 ) Array ( [jml] => 6 ) Array ( [jml] => 18 ))
to [833, 6, 18]
My questions are how to print my php variable inside javascript and how to change php's array style to javascript's array style. Thanks