i try to building graph with charts swf (flash)
from query table i have 2 field like year,num,
i want result from script like this
$chart [ 'chart_data' ][ 0 ][ 0 ] = "";
$chart [ 'chart_data' ][ 0 ][ 1 ] = "2001";
$chart [ 'chart_data' ][ 0 ][ 2 ] = "2002";
$chart [ 'chart_data' ][ 0 ][ 3 ] = "2003";
$chart [ 'chart_data' ][ 0 ][ 4 ] = "2004";
$chart [ 'chart_data' ][ 1 ][ 0 ] = "Drop Call";
$chart [ 'chart_data' ][ 1 ][ 1 ] = 5;
$chart [ 'chart_data' ][ 1 ][ 2 ] = 10;
$chart [ 'chart_data' ][ 1 ][ 3 ] = 30;
$chart [ 'chart_data' ][ 1 ][ 4 ] = 63;
=====
i try to make script like this
$chart [ 'chart_data' ][ 0 ][ 0 ] = "";
$chart [ 'chart_data' ][ 1 ][ 0 ] = "Drop Call";
$bar=1;
while($row = mysql_fetch_array($resultmoto))
{
$data[] = $row[1];
$leg[] = $row[0];
$chart [ 'chart_data' ][ 0 ][ $bar ] = $data;
$chart [ 'chart_data' ][ $row ][ $bar ] = $leg,
$bar++;
}
but the result still cannot display.
please check
tx