I have got 2 arrays; one hold ingredient and the other hold measurement. how would i go through and list the ingredient with its corresponding measurement in the other array until i have listed all the ingredients for the recipe. here is the code i currently have. I have tried while statements and it lists the first ingredient but then lists all the measurements and then the remaining ingredients.
$mysqlResult3 = mysql_query("SELECT name FROM ingredient JOIN recipeingredient ON ingredient.ingredientid = recipeingredient.ingredientid WHERE recipeingredient.recipeid = '" . $recipeid . "'"); $mysqlArray3 = mysql_fetch_assoc($mysqlResult3);//if the query should be 1 row $mysqlResult4 = mysql_query("SELECT quantity FROM recipeingredient WHERE recipeingredient.recipeid = '" . $recipeid . "'"); $mysqlArray4 = mysql_fetch_assoc($mysqlResult4);//if the query should be 1 row