I have the following code that (should) print out a table with data lables above the data:
Printing Results In Table Format
echo "<table border=1>\n";
echo "<tr><td>Data Label 1</td><td>Data Label 2</td></tr>\n";
$mycol = mysql_fetch_row($result);
printf("<tr><td>%s</td><td>%s</td></tr>\n", $mycol[0], $mycol[1] );
echo "<tr></tr>\n";
echo "<tr><td>Data Label 3</td><td>Data Label 4</td></tr>\n";
printf( "<tr><td>%s</td><td>%s</td></tr>\n", $mycol[2], $mycol[3] );
echo "</table>\n";
It will print the first and second row of Data Lables and the first row of data, but it will not print the second row of data. I have tried the code with an additional "$mycol = " directly above the second data row, but I get the same results. Is there something special I need to do to get the mysql_fetch_row($result) array to be persistent over these echo and printf() statements? (Yes, the query returns four pieces of data.)