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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.