Chevy Posted August 13, 2006 Share Posted August 13, 2006 I am making a game and I only want 4 things displayed on 1 line My Code Now:[code]<?php$frogs = 1;$level = 8;echo "<h3>Level $level</h3>";echo '<table border="0" align="center"><tr>';while ($frogs <= $level) {echo "<td>";echo '<form action="" method="POST">';echo 'Frog ';echo "$frogs";echo '<br><input type="submit" name=';echo "\"$frogs\"";echo ' value="Choose This Frog!"></td>';$frogs = $frogs + 1;}echo "</tr></table>";?>[/code] Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 13, 2006 Share Posted August 13, 2006 there you go four frogs on one link ok.[code]<?php$frogs = 1;$level = 4;echo "<h3>Level $level</h3>";echo '<table border="0" align="center"><tr>';while ($frogs <= $level) {echo "<td>";echo '<form action="" method="POST">';echo 'Frog ';echo "$frogs";echo '<br><input type="submit" name=';echo "\"$frogs\"";echo ' value="Choose This Frog!"></td>';$frogs = $frogs + 1;}echo "</tr></table>";?>[/code] Quote Link to comment Share on other sites More sharing options...
Chevy Posted August 13, 2006 Author Share Posted August 13, 2006 Haha, I know that...What if I had 10 there? I want it to make a new line or <tr> every multiple of four like so: 1 2 3 4 5 6 7 8 9 10 11 12 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.