Jump to content

data won't format


niche

Recommended Posts

Why are my prices on top of my table?$.25$1.00$2.00Company Item PriceCompany A Product BCompany B Product BCompany C Product CMy script:

<?phpinclude_once "connect_to_mysql.php";$result = mysql_query("SELECT * FROM clioff") or die(mysql_error()); echo "<table border='1'>";echo "<tr> <th>Company</th> <th>Item</th> <th>Price</th></tr>";// keeps getting the next row until there are no more to getwhile($row = mysql_fetch_array( $result )) {	// Print out the contents of each row into a table	echo "<tr><td>"; 	echo $row['client'];	echo "</td><td>"; 	echo $row['item'];	echo "</td></tr>"; 	echo $row['price'];	echo "</td></tr>"; } echo "</table>";?>

Link to comment
Share on other sites

I think you closed the <tr> tag too soon; on the line after you echo $row['item'];

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...