I am trying to create a dynamic pie chart with php. I am new at php programming, so I might just be missing something somewhere.
Anyway, this is what I have so far: <html> <center><img src="http://chart.apis.google.com/chart?chs=750x300 &chd=t:1 &cht=p &chl=NC|MC|PC|SC|FC"/></center> </html> The code above works. <?php $t=1; ?> <html> <center><img src="http://chart.apis.google.com/chart?chs=750x300 &chd=t:<?php echo $t1; ?> &cht=p &chl=NC|MC|PC|SC|FC"/></center> </html> The code above works too; however, as soon as I try to do something with a variable as in the case below: <?php $t=1; $r=2; $s=$t+$r; ?> <html> <center><img src="http://chart.apis.google.com/chart?chs=750x300 &chd=t:<?php echo $t; ?>,<?php echo $r; ?>,<?php echo $s; ?> &cht=p &chl=NC|MC|PC|SC|FC"/></center> </html> I get a blank screen. In the actual code I will be using, I use a switch-case for counting the number of each variable and then want to display the pie with the results of the counting. At the moment, there is nothing being displayed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Chart API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-chart-api?hl=en -~----------~----~----~----~------~----~------~--~---
