on 1/22/03 12:08 AM, Michael Conway at mconway3@cox.net appended the following bits to my mbox: > I find myself stuck in coming up with a way to cycle through this > array of db results for porting to a graphing script that I did not > write. My latest attempt to get around this problem is below. Outside > of the $graph->SetDataValues(array( ));, echoing $array[$i] produces the > desired results for three sets of two bar graphs with the corresponding > title. However, inside the $graph function, I get only the last > expected set of bar graphs and title. I originally iterated through > each anticipated result from mysql_fetch_array($result) and plugged each > of these values into an array calling the columns individually. I got > the desired graph, but, of course this is bad programming and not useful > for queries producing a greater number of rows (I simply needed to know > it worked). Any help would be appreciated. What exactly is the Graph class expecting in terms of data? Is it supposed to generate several graphs when you give it the data, or one graph per specified dataset? If it's the latter, move the $graph->DrawGraph(); call inside your while loop. If not, let us know what format it needs the data in and we'll help you figure out how to get it from the database into that format. If you can't figure out what format of data the class needs, you should let us see the graph class source. HTH. Sincerely, Paul Burney http://paulburney.com/ <?php if ($your_php_version < 4.1.2) { upgrade_now(); // to avoid major security problems } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php