Witam

Generuję wykres z pomocą klasy PHPlot.
Chciłbym się dowiedzieć, jak zamienić użycie tablicy array na postać $tablica[xxx]w tym przypadku , ponieważ mam kilkadziesiąt rekordów generowanych dynamicznie i przkazywanych do wykresu i nie mogę wpisywać z ręki na "sztywno"
Oto przyklad:
  1. <? 
  2. include ( &#092;"phplot.php\");
  3. $graph = new PHPlot;
  4.  
  5. $graph->SetDataType( &#092;"linear-linear\");
  6.  
  7. // Specify some data 
  8.  
  9. $data = array(
  10. array( &#092;"\", 2000,  750),
  11. array( &#092;"\", 2010, 1700),
  12. array( &#092;"\", 2015, 2000),
  13. array( &#092;"\", 2020, 1800),
  14. array( &#092;"\", 2025, 1300),
  15. array( &#092;"\", 2030,  400)
  16. );
  17.  
  18.  
  19. $graph->SetDataValues($data);
  20.  
  21. //Specify plotting area details 
  22. $graph->SetImageArea(600,400);
  23.  
  24. //$graph->SetPlotType(\"lines\");
  25.  
  26. $graph->SetTitleFontSize(&#092;"5\");
  27.  
  28. //$d = 'znak';
  29. $graph->SetTitle(&#092;"Statystyka Sprzedaży\");
  30.  
  31. $graph->SetPlotAreaWorld(2000,0,2035,2000);
  32.  
  33. $graph->SetPlotBgColor(&#092;"red\");
  34.  
  35. $graph->SetPlotBorderType(&#092;"left\");
  36.  
  37. $graph->SetBackgroundColor(&#092;"white\");
  38.  
  39. //Define the X axis 
  40. $graph->SetXLabel(&#092;"Year\");
  41.  
  42. $graph->SetHorizTickIncrement(&#092;"5\");
  43.  
  44. //Define the Y axis 
  45. //$graph->SetVertTickIncrement(\"500\");
  46. $graph->SetPrecisionY(&#092;"0\");
  47.  
  48. $graph->SetLightGridColor(&#092;"blue\");
  49.  
  50. $graph->SetDataColors( array(&#092;"yellow\"), array(\"green\") );
  51.  
  52. $graph->DrawGraph();
  53.  
  54. ?>