Referencing that link from Weedpacket, again show here, http://phpbuilder.com/board/showthread.php?t=10294138, can someone please explain what is going on with this snippet of code:
// Let's begin our loop.
for($i=0; $i<$count; $i++)
{ // Whenever $i is a multiple of $display_columns (including 0),
// it's a sign that we're hitting the start of a new row.
if($i%$display_columns == 0)
echo '<tr>';
//Now for an item.
echo '<td>';
echo mysql_result($result,'value',$i);
echo '</td>';
//Whenever $i is one less than a multiple of $display_columns,
// it's a sign that we're hitting the end of the current row.
if($i%$display_columns == $display_columns-1)
echo '</tr>';
}
Specifically, I do not get the part where the data is printed.
echo mysql_result($result,'value',$i);
What is 'value' here?
Also, the $result will be holding several tuples, each of which has several attributes (columns). I don't get what is being printed here.
This was probably just an example and he was showing that you can print something from the results. But i don't get it. No doubt, it is because of my limited understanding of php, and in specific, of the call mysql_result.
How do I basically take one row of the results, and then print the various attributes in that row?
Thanks.