I have the following code. Please look at the jsfiddle page. In this code there are static numbers, 5 and 10. These need to be changed to dynamic numbers, produced by PHP code in variables $result1
and $result2
.
I have tried numerous things, see the jsfiddle page please.
So basically how to replace the 5 and 10 with PHP code in the example below?
var pie = new RGraph.Pie('cvs', [result1,10]);
The solution thanks to Jeff Shaver with help from Clamidity:
var pie = new RGraph.Pie('cvs', [<?php echo $result1; ?>,<?php echo $result2; ?>]);