Can't you just join the two queries and use a single loop ?
mysql_query("SELECT name,quantity
FROM ingredient JOIN recipeingredient ON ingredient.ingredientid = recipeingredient.ingredientid
WHERE recipeingredient.recipeid = '" . $recipeid . "'");
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875