Jump to content

Stuck..


Chevy

Recommended Posts

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]
Link to comment
https://forums.phpfreaks.com/topic/17403-stuck/
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/17403-stuck/#findComment-74056
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.