Staggan Posted January 6, 2012 Share Posted January 6, 2012 Hello I am trying to display some results in a while loop, and would prefer to do this in a table instead of just echoing to the screen... This is my code: while ($row = mysql_fetch_assoc($results)) { $issue = $row[name]; echo $issue; } Showing these in a single column table would be fine, but not sure how... Thanks Quote Link to comment https://forums.phpfreaks.com/topic/254514-dynamic-table/ Share on other sites More sharing options...
Pikachu2000 Posted January 6, 2012 Share Posted January 6, 2012 Echo the opening <table> tag before the loop. Echo <tr><td></td></tr> tags in the loop, with your data in the middle, then echo the closing </table> tag after the loop. Quote Link to comment https://forums.phpfreaks.com/topic/254514-dynamic-table/#findComment-1305051 Share on other sites More sharing options...
Staggan Posted January 6, 2012 Author Share Posted January 6, 2012 Sorted, thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/254514-dynamic-table/#findComment-1305058 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.