-3
所以我有下面的代码基本上当它运行它将显示一个图形。我怎样才能让数组内的变量工作变量的作品,当回声会给一个数字,但由于某种原因,它不会输入数字。 $ mar1 in [here]PHP数组中的变量?
$lineChart = new gLineChart($_GET['width'],$_GET['height']);
[here]$lineChart->addDataSet(array($mar1,315,66,40));[/here]
$lineChart->setLegend(array("first"));
$lineChart->setColors(array("ff3344", "11ff11", "22aacc", "3333aa"));
$lineChart->setVisibleAxes(array('x','y'));
$lineChart->setDataRange(30,400);
$lineChart->addAxisLabel(0, array("This", "axis", "has", "labels!"));
$lineChart->addAxisRange(1, 30, 400);
$lineChart->setGridLines(0, 15);
$lineChart->renderImage();
你在哪里声明'$ mar1'?显示。 – 2012-03-03 00:30:55
here $ mar1 = mysql_num_rows(mysql_query(“SELECT * FROM'reports' WHERE'status' ='1'AND'pid' ='$ publisher_id'AND'month' ='03'”)); – user1210121 2012-03-03 01:15:53