What I am trying to do is to run a query in my database and output a table to a php file. If the query yields 10 resuts or rows, I would like the far left column to read 1,2,3,4,5,6,7,8,9,10.
What happens now is it outputs all 1's in the first column and not 1,2,3, etc.
Any ideas? Any help would be appreciated!
echo "<table width='350' border='1' cellspacing='0' cellpadding='1' bgcolor='ffffff'>";
while($row = mysql_fetch_array( $result )) {
echo "<tr><td width='20' bgcolor='ffffff' align='center'><font face='arial' size='2' color='000000'>";
$n="0";
echo "".++$n;
echo "</td><td width='170' bgcolor='ffffff' align='left'><font face='arial' size='2' color='000000'>";
echo $row['Last'];
echo ", ";
echo $row['First'];
echo "</td>
}
echo "</table>";