I need your help for this case.
I have an array in PHP.
How can I apply this array:
$visits = $ga->query($params);
Witch gave me something like this:
Array
(
[http_code] => 200
[kind] => analytics#gaData
[rows] => Array
(
[0] => Array
(
[0] => 20141223
[1] => 26
)
[1] => Array
(
[0] => 20141224
[1] => 15
)
...
In this code :
<? function getVisits() {
$morris = new MorrisLineCharts('getVisits');
$morris->xkey = array('date');
$morris->ykeys = array('value');
$morris->labels = array('Money');
$morris->data = array(
array('date' => '20141223', 'value' => 26),
array('date' => '20141224', 'value' => 15),
);
echo $morris->toJavascript();
}
getVisits();
?>
Thanks a lot.