Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $recipe = "Coffee and Date Dough"; // this isn't normally hard coded..
- echo('<table width="25%" border="1">');
- // This basically gets all of the recipe into an array
- $query = mysql_query("SELECT * FROM recipe WHERE recipe='{$recipe}'");
- while($row = mysql_fetch_array($query)){
- // Couldn't think of a better way to count to 18 without using something like this.
- for($count = 1; $count < 19; $count++) {
- $ing = "ing".$count;
- $per = "per".$count;
- // Echo out the table information
- echo("<tr><td>$row[$ing]</td><td>$row[$per]</td></tr>");
- }
- }
- echo("</table>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment