I would like to draw a Google chart. In the example, we get the following url to embeded into our HTML code :
https://chart.googleapis.com/chart?cht=lc&chs=250x100&chd=t:60,40
How can I replace the data t:60,40 by an array of data I get from a db ?
Let's say I have the following array, $chartdata :
$chartdata = [1, 2, 3, 4, 5]
Now, I would like to draw the same chart as above, but using my $chartdata.
The following method is not working :
<?php
echo "<img src='https://chart.googleapis.com/chart?cht=lc&chs=250x100&chd=t:" . $chartdata ."'>";
?>
Does someone has an idea ?
Thank you