woodplease Posted February 18, 2011 Share Posted February 18, 2011 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 Link to comment https://forums.phpfreaks.com/topic/228147-display-table-data-in-columns-instead-of-rows/ Share on other sites More sharing options...
Pikachu2000 Posted February 18, 2011 Share Posted February 18, 2011 This thread should get you started: http://www.phpfreaks.com/forums/faqcode-snippet-repository/multi-column-results/msg381816/#msg381816 Link to comment https://forums.phpfreaks.com/topic/228147-display-table-data-in-columns-instead-of-rows/#findComment-1176529 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.