When I want to display a table onto the screen I use this code.... $query = "SELECT * FROM database"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); for ($i = 0; $i < $num_rows; $i++) { $field1 = mysql_result($result, $i, field1); $field2 = mysql_result($result, $i, field2); echo $field1.$field2; }
...but I heard that using mysql_result() is very ineffecient and that I should be using mysql_fetch_array() instead. So how could produce those same results using mysql_fetch_array() instead?? THANKS!! YOU GUYS ROCK!!!