budimir Posted October 2, 2008 Share Posted October 2, 2008 Hey guys, How can I display results in columns (3 or more), not in rows??? Instead of this: Name | Last Name | Adress | City | Country I want this: Name Name Name Last Name Last Name Last Name Adress Adress Adress City City City Country Country Country Link to comment https://forums.phpfreaks.com/topic/126784-solved-display-result-in-columns/ Share on other sites More sharing options...
F1Fan Posted October 2, 2008 Share Posted October 2, 2008 <?php echo "<table><tr>"; while ($row = mysql_fetch_assoc($result)){ echo "<td><table>"; foreach ($row as $k=>$v){ echo "<tr><td>$k: $v</td></tr>"; } echo "</table></td>"; } echo "</tr></table>"; ?> Link to comment https://forums.phpfreaks.com/topic/126784-solved-display-result-in-columns/#findComment-655769 Share on other sites More sharing options...
revraz Posted October 2, 2008 Share Posted October 2, 2008 http://www.phpfreaks.com/forums/index.php/topic,95426.0.html Link to comment https://forums.phpfreaks.com/topic/126784-solved-display-result-in-columns/#findComment-655772 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.