Jump to content

display a single field in a table?


mwjansen

Recommended Posts

i'm pulling just one field out of my table, removing dupes, but the way i have it, each entry just sits next to the previous one. (eg "vendor1 vendor2 vendor3 etc.")

 

i'm trying to get it so that it at least appears as though it is a 3 or 4 column table.

 

 

 

 $sql = "SELECT DISTINCT vendor FROM reviews ORDER BY vendor";

$result = @mysql_query($sql) or die("Unable to retrieve from database");

while ($row = mysql_fetch_array($result)) {


$vendor = stripslashes ($row['vendor']);

$display_block1 .= "<a href='indextest.php?vendor=$vendor'>$vendor</a> &nbsp ";
}

 

Link to comment
https://forums.phpfreaks.com/topic/194382-display-a-single-field-in-a-table/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.