I'm using google Line chart for my college project, here i want to add rows dynamically based on the user selection from database, addRow() function is used to add a row but i want it to be add by looping. someone can help me?
Here is my code:
var rowArray1 = [];
var rowArray2 = [];
<?php
for($i=1;$i<=$count;$i++)
{
$row=mysql_fetch_array($rows);
echo "rowArray1.push('". $row['a'] ."')";
echo "rowArray2.push(". $row['b'].")";
array_push($rowArray,"'".$row['a']."',".$row['b']);
}
?>
for(i=0;i<count;i++)
{
data.addRow( [rowArray1[i], rowArray2[i]] );
}
it's not working properly... :-(