Jump to content

display table data in columns instead of rows


woodplease

Recommended Posts

i'm trying to echo out the results from a query onto a page, but rather than having them echo out as rows in a table, i want them to be displayed in columns, i.e. first column would have the first 10 results and the second column would have the next to. Any ideas on how i could do this?

 

at the moment i'm using this code to display my results

$read=mysql_query("SELECT * FROM entry WHERE category_id=".$id." ORDER BY entry_title") or die("query failed".mysql_error());
$result=mysql_num_rows($read);
for($j = 0; $j < $result; $j++) { 
   	$row = mysql_fetch_array($read);
echo "<a href=article.php?id=".$row['entry_id']. ">".$row['entry_title']."</a><br />";
}

but this just displays it as a list down the middle

 

thanks

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.