PDA

View Full Version : [PHP&mySQL] Simple Question



bozley05
February 22nd, 2004, 22:54
My mySQL learning was going great until I am not able to do something simple. I have my mysql_query() and mysql_fetch_array() which is all good, but now I want to list all items the query returned into a table in a php document. It may be mysql_fetch_row() or something, but i donno...

What I want is for each row it returns to make
<tr>
<td>mysql row info</td>
</tr>

I hope you know what I mean...

spec
February 23rd, 2004, 00:43
while($row = mysql_fetch_assoc($result))
{
echo row['field'];
}