Jump to content

While loop question


hostfreak

Recommended Posts

[code]
$i=1;
echo '<table width="200" border="0" cellpadding="0" cellspacing="0">';
while ($num < 10) {
if ($i == 1) {
  echo '<tr>';
}
elseif ($i == 3) {
  echo '</tr>';
  $i=1;
}
echo '<td>$location</td>';
$i++;
}
echo '</table>';
[/code]


i think that should work :)

Liam
Link to comment
https://forums.phpfreaks.com/topic/18919-while-loop-question/#findComment-81734
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.