So I am using FLOT to generate some bar graphs and it uses some javascript arrays to allow for the data. I have a query that spits out the correct labels and values as so:
while ($row = mysql_fetch_array($chart_stats)){
printf("Race is: %s Percentage: %s", $row['Race'],$row['Percentage'] ."<br/>");
}
My question is can I get the values of my array from php into the array of Javascript (if that makes sense)
var d1 =[0, 72]; //instead of static value maybe var d1 = [0,<?printf($row['Percentage'])?>];
var d2 =[1,3];
var d3 = [2,40];
Thanks in advance!