"; echo " Name Age "; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo ""; echo $row['firstname']; echo ""; echo $row['lastname']; echo ""; } echo ""; ?>