ma5ect Posted November 26, 2008 Share Posted November 26, 2008 Hi all, I have a form and few check boxes, when the user selects the choices i want the result to be displayed in a table..i have the follwing code but the text just appears in a list.. <table width="200" border="5" cellspacing="2" cellpadding="5"> <tr> <th scope="row"><div align="center"><strong>Days</strong></div></th> <td><div align="center"><strong>Time</strong></div></td> </tr> <tr> <th scope="row"><? } else { foreach($modulename as $f) { echo $f."<br />"; } }echo $schedule."<br />"; ?></th> <td> </td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/134349-displaying-check-box-choice-in-a-table/ Share on other sites More sharing options...
ILMV Posted November 26, 2008 Share Posted November 26, 2008 You are looping through your array with <br>, this will display like this... Line 1 Line 2 Line 3 You need to loop through with your <td> this will display like this... (The dotted lines indicate the table) |----------------------- | Line 1 |----------------------- | Line 2 |----------------------- | Line 3 |----------------------- Link to comment https://forums.phpfreaks.com/topic/134349-displaying-check-box-choice-in-a-table/#findComment-699446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.