I want to create something like this, were it puts different things into the table as it outputs. Like one row it will include recipe 1, 2, and 3 and the next row could have recipe 1, 2, 3, 4, 5, and 6 depending on what "recipe =="
The problem is I keep getting this error message.
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in home/mysite/mysite on line 202
Line 202 = elseif ($myrow["recipe"] == "1"){$myrecipe = "$myrow['recipe1']";}
$result = mysql_query("SELECT * FROM $table ORDER BY $sort");
if ($myrow = mysql_fetch_array($result)) {
?>
<center><table border=1 width="1191">
<tr>
<td width="248"><font color="#800080"><center><b>Name</center></td>
<td width="41"><font color="#800080"><center><b>Level</center></td>
<td width="210"><font color="#800080"><center><b>
<?php
if ($table == "ore")
{echo "Refining Cost";}
else {echo "Manufactuing Cost";}
?> </center></td>
<td width="178"><font color="#800080"><center><b>
<?php
if ($table == "ore")
{echo "Harvesters";}
else {echo "Builders";}
?> </center></td>
<td width="306"><font color="#800080"><center><b>Notes and Abilities</center></td>
<td width="360"><font color="#800080"><center><b>Recipe</center></td>
<td width="112"><font color="#800080"><center><b>Time Created</center></td>
</tr>
<?PHP
do {
if ($myrow["recipe"] == "0"){$myrecipe = "No Recipe";}
elseif ($myrow["recipe"] == "1"){$myrecipe = "$myrow['recipe1']";}
elseif ($myrow["recipe"] == "2"){$myrecipe = "$myrow['recipe1'].', '.$myrow['recipe2']";}
elseif ($myrow["recipe"] == "3"){$myrecipe = "$myrow['recipe1'].', '.$myrow['recipe2'].', '.$myrow['recipe3']";}
elseif ($myrow["recipe"] == "4"){$myrecipe = "$myrow['recipe1'].', '.$myrow['recipe2'].', '.$myrow['recipe3'].', '.$myrow['recipe4']";}
elseif ($myrow["recipe"] == "5"){$myrecipe = "$myrow['recipe1'].', '.$myrow['recipe2'].', '.$myrow['recipe3'].', '.$myrow['recipe4'].', '.$myrow['recipe5']";}
elseif ($myrow["recipe"] == "6"){$myrecipe = "$myrow['recipe1'].', '.$myrow['recipe2'].', '.$myrow['recipe3'].', '.$myrow['recipe4'].', '.$myrow['recipe5'].', '.$myrow['recipe6']";}
else {$myrecipe = "Error, Contact AL";}
printf("<tr>
<td width=248>%s </td>
<td width=41>%s </td>
<td width=210>%s </td>
<td width=178>%s </td>
<td width=306>%s </td>
<td width=360>%s </td>
<td width=112>%s </td>
\n",$myrow["name"], $myrow["level"], $myrow["manufacturing_cost"], $myrow["builders"], $myrow["special_notes"], $myrecipe, $myrow["time"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table></center>\n";