xProteuSx Posted April 22, 2008 Share Posted April 22, 2008 I hope I can make someone understand what the problem is ... its 1 am and I am crashing hard. The whole problem is that this snippet really does not like the <ol type="a"> outside of the 'while' loop. What I am trying to do is, say the array has 4 variables, I would like a., b., c., and d., to appear to the left of the <input type="radio" name="answer" value="' . $value . '"> button(s). Now, I am getting something there, but I am getting 0., 0., 0., and 0. instead of the letters. Please help!!!! Thanks in advance. echo '<center>'; echo '<form action="mark_spec.php">'; echo '<ol type="a">'; while (list($key,$value) = each($answers_array)) { echo '<table width="400" cellspacing="0" cellpadding="2">'; echo '<tr>'; echo '<td valign="top">'; echo '<li>'; echo '<font size="-1"> <input type="radio" name="answer" value="' . $value . '"></font>'; echo '</td>'; echo '<td valign="top">'; echo '<font size="-1">' . $value . '</font>'; echo '</li>'; echo '</td>'; echo '</tr>'; echo '</table>'; } echo '</ol>'; echo '<input type="submit" value="Check Answer">'; echo '</form>'; echo '</center>'; Link to comment https://forums.phpfreaks.com/topic/102293-while-loop-interfering-with-alignment-issue/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.