182x Posted July 17, 2007 Share Posted July 17, 2007 Hey guys, I have been using the following code to put data from a query into the arrays as shown below. However there will be some cases where the data will have to be calculated from the one or more queries and stored in an array before the while loop can be performed. So I was wondering how do you perform the same while loop but with the results stored in an array as the mysql_fetch_array would not work? mysql_select_db("gra",$db) or die(mysql_error()); $query = mysql_query("SELECT name, count(*) FROM gra group by name") or die(mysql_error()); while($getData = mysql_fetch_array($query)){ $points[] = $getData[1]; $months[] = $getData[0]; } Link to comment https://forums.phpfreaks.com/topic/60337-array-trouble/ Share on other sites More sharing options...
matto Posted July 17, 2007 Share Posted July 17, 2007 I think you are going to have provide more information....the question is not clear enough... Link to comment https://forums.phpfreaks.com/topic/60337-array-trouble/#findComment-300268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.