{
$rs = mysql_query("SELECT * FROM contributions where type = 'ticket'");
// create an array holding the classes you want to switch between
$classes=array("td1","td2");
// a counter to keep track of which class is currently being used
$classifier=0;
$num = mysql_num_rows($rs);
$i = 0;
echo "<TABLE width=100% align=left cellpadding=5 cellspacing=0>";
echo "<tr class=trhead >";
echo"<td>Description</td>";
echo"<td>Price</td>";
echo"<td>Quantity</td>";
echo"<td>Amount</td>";
echo "</tr>";
while ($i < $num){
$description = mysql_result($rs,$i,"description");
$price= mysql_result($rs,$i,"price");
//$dmiddle= mysql_result($rs,$i,"middle");
// access the value in the array associated with the key equal to the counter and print it in the <tr> bg
echo "<tr class=" . $classes[$classifier] .">";
echo "<td>" . $description . "</td>";
echo "<td>" ."$". $price . "</td>";
[COLOR="Red"]echo "<td>"<input type="text" name="quantity[]" value="" size="2" />"</td>";
echo "<td >"<input type="text" name="amount[]" value="" size="2" /> "</td>";[/COLOR]
echo "</tr>";
$i++;
// increment the counter and mod it by 2 to effectively alternate between two numbers
$classifier=($classifier+1)%2;
}
}
echo "</table>";
?>
This the error I get and line 42 begins in red.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\wamp\www\rising\ticinsert.php on line 42