Justin French wrote:
There was a post on a similar thing the other day, and about once a week for
the past few years :P
Quick (untested) example:
<table>
<?
$i = 0;
$sql = 'select link from tablename';
$result = mysql_query($sql);
while($myrow = mysql_fetch_array($result))
{
$i++;
if($i == 1) { echo '<tr>'; }
echo "<td>{$myrow['link']}</td>";
if($i == 2) { echo '</tr>'; $i = 0; }
}
?>
</table>
This is easily adaptable to three (or more) columns by changing the last
if() statement...
Justin
on 20/12/02 5:21 PM, conbud ([EMAIL PROTECTED]) wrote:
Hi. Lets says I have 8 links stored in a database, extracting those links is no problem. Now lets says I have 2 columns, how do I get link 1 into column 1 then get link 2 into column 2 then link 3 into column 1 and link 4 into column 2 and so on...<table> <tr> <td>This is column 1</td> <td>This is column 2</td> </tr> </table> -- Conbud Graphic & Web Design Using Open Source Technology --
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php