You should iterate through the results if I am understanding the issue correctly. Also, in your MySQL command you need to set an AS for the AVG(rating). And I have set mysql_fetch_assoc (instead of mysql_fetch_row) for the results to be returned in an associative array:

foreach ($storeids as $storeid) {
  $result = mysql_query("SELECT AVG(rating) AS rating FROM reviews GROUP BY store_id WHERE store_id = '$storeid'");
  while ($row = mysql_fetch_assoc($result)) {
    echo $row['rating'];
  }
}


EDIT Looking at your query and seeing the $storeid being set, unclear where that value is coming from but I wrapped the solution I have provided in a foreach loop which assumes you have a list—and hopefully an array—that contains all of the $storeids in to loop through.

PHP - how to output a MySQL average store rating in a loop
I read somewhere where rich hickey said:  


  "I think continuations might be neat
  in theory, but not in practice"


I am not familiar with clojure.
1. Does clojure have continuations?
2. If no, dont you need continuations? I have seen a lot of good examples especially from this guy. What is the alternative?
3. If yes, is there a documentation?
