Hello,
I've a table "prices" (id, price1, price2, price3, price4, price5, price6). I select values from this table:
$query = "SELECT id, price1, price2, price3, price4, price5, price6 FROM prices";
$result = mysql_query($query);
The problem begins when I start output table values:
if ($result)
{
$row = mysql_fetch_array($result);
echo "<table>";
for ($i = 1; $i < 7; $i++)
{
str = "<tr><td>$i</td><td> stripslashes($row[\"price$i\"])</td></tr>";
eval ("\$str = \"$str\";");
echo $str;
}
echo "</table>";
}
Error occurs in the line, where I form $str. Maybe somebody can help me.