{ while($row = mysql_fetch_row($res)) { array_push($data,$row[3]); //*** } } $graph->SetDataValues($data);