Results 1 to 8 of 8
Apr 10, 2009, 12:12 #1
- Join Date
- Apr 2004
- 0 Post(s)
- 0 Thread(s)
array of values from database to data string
I need to create an array of numerical data from some mathematical queries from my DB for some graphs using Jpgraph. I have the arrays displaying correctly but I am having some problems getting them into the axis points on the graph.
I basically need to transform this:
$val = 18;
$val = 16;
$val = 5;
$pl = 14;
$pl = 9;
$pl = 22;
$data1 = array(); //should have the $val array here
$data2 = array(); //should have the $pl array here.
$data1 and $data2 should correspond with each other. $val and $pl mark the horizontal and vertical placment for tick mark 1 on the plot respectively.
Currenty my $data1 and $data2 varialbes look like this:
$data1 = array($val);
$data2 = array($pl);