Jump to content


Photo

Stuck..


  • Please log in to reply
2 replies to this topic

#1 Chevy

Chevy
  • Members
  • PipPipPip
  • Advanced Member
  • 163 posts

Posted 13 August 2006 - 11:35 AM

I am making a game and I only want 4 things displayed on 1 line

My Code Now:
<?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>";
?>


#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 August 2006 - 11:41 AM

there you go four frogs on one link ok.

<?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>";
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Chevy

Chevy
  • Members
  • PipPipPip
  • Advanced Member
  • 163 posts

Posted 13 August 2006 - 11:47 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users