Here is my question
when i run the below code which is php with codeigniter framework
$data= $datatable->result();
foreach ($data as $graph) {
$to_graph[] = "Date.UTC(".$graph->year.")," . $graph->ANN ;
}
return json_encode($to_graph);
i get the following out put
["Date.UTC(2040),934","Date.UTC(2040),1003","Date.UTC(2040),1747","Date.UTC(2040),1336","Date.UTC(2040),973","Date.UTC(2040),912","Date.UTC(2040),1112","Date.UTC(2040),793","Date.UTC(2040),973","Date.UTC(2040),786","Date.UTC(2040),759","Date.UTC(2040),1001","Date.UTC(2040),1221","Date.UTC(2040),1270","Date.UTC(2040),1355","Date.UTC(2040),923","Date.UTC(2040),942","Date.UTC(2040),999","Date.UTC(2040),1128","Date.UTC(2040),908"]
But for highcharts highstock to draw it on the graph it needs to be displayed like this
[Date.UTC(2003),0.8709],
[Date.UTC(2003),0.872],
[Date.UTC(2003,26),0.8714],
[Date.UTC(2003),0.8638],
[Date.UTC(2003),0.8567],
[Date.UTC(2005),0.8536],
[Date.UTC(2005),0.8564],
[Date.UTC(2005),0.8639],
[Date.UTC(2009),0.8538],
[Date.UTC(2009),0.8489],
[Date.UTC(2009),0.8459],
[Date.UTC(20011),0.8521],
[Date.UTC(2011),0.6945]
]);
so can you help me in converting my json out put to that of highstocks without the quotes ""
Thanks