hostfreak Posted August 28, 2006 Share Posted August 28, 2006 I am looping through results of locations and need to display them in a table, two columns arcoss then have it go to the next row. I am not sure how to do that though? Quote Link to comment Share on other sites More sharing options...
shocker-z Posted August 28, 2006 Share Posted August 28, 2006 [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 Quote Link to comment Share on other sites More sharing options...
hostfreak Posted August 28, 2006 Author Share Posted August 28, 2006 Doesn't seem to work, it just keeps looping without stoping. Quote Link to comment Share on other sites More sharing options...
hostfreak Posted August 28, 2006 Author Share Posted August 28, 2006 With slight modification I've got it to work. Thanks. 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.