Passing variable to Google Charts URL
Posted
by Rob A
on Stack Overflow
See other posts from Stack Overflow
or by Rob A
Published on 2010-03-23T23:41:11Z
Indexed on
2010/03/23
23:43 UTC
Read the original article
Hit count: 671
php
|google-charts
Hi All,
This is probably something really simple, however I am quite new to PHP, and havent done any HTML in years.
I need to get a PHP variable filled with an array of figures into Google Charts. My code for this so far is:
<img src="http://chart.apis.google.com/chart?
&chs=340x175
&chd=t:<?=$filedetail[1]?>
&cht=lc
&chtt=Test
">
However, Google reports an error, as it stops at the ?=$filedetail[1] for some reason. It doesnt seem that reading the variable is the problem, more that the API simply cant read past the start of the PHP tags.
Thanks,
Rob A.
© Stack Overflow or respective owner