묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
for문을 돌려서 어떠케 댈거 같은데 잘 모르겠어요
아는님들 갈켜주세요 ㅜ.ㅜ
<table border=0 cellspacing=0 cellpadding=0 width=97% align=center>
<tr>
<?
while ($row = mysql_fetch_array($result))
{
?>
<td width=25% align='center' valign='top'+ '+ ' style='padding:10pt'>
<table border=0 cellpadding=8 cellspacing=0 style='border:#e1e1e1 1px solid;' bgcolor='+ '#f8f8f8'>
<tr><td width=100 height=100 align=center><a href="view.php?page=<?=$page?>&id=<?=$row[id]?>"><img src="<?=$row[pic1] ?>" width=150 height=150 border=0></a></td>
</tr>
</table>
<font style='font-size:8pt' color=#797979>
<?=$row[addr1]?> <?=$row[size]?> <?=$row[price] ?></font>
</td>
<?
$cur_num--;
}
?>
</tr>
</table>
게시판 리스트를 겔러리형식으로(2행 3열) 나타내고 싶은데...
2003.01.18 15:50
for문을 돌려서 어떠케 댈거 같은데 잘 모르겠어요
아는님들 갈켜주세요 ㅜ.ㅜ
<table border=0 cellspacing=0 cellpadding=0 width=97% align=center>
<tr>
<?
while ($row = mysql_fetch_array($result))
{
?>
<td width=25% align='center' valign='top'+ '+ ' style='padding:10pt'>
<table border=0 cellpadding=8 cellspacing=0 style='border:#e1e1e1 1px solid;' bgcolor='+ '#f8f8f8'>
<tr><td width=100 height=100 align=center><a href="view.php?page=<?=$page?>&id=<?=$row[id]?>"><img src="<?=$row[pic1] ?>" width=150 height=150 border=0></a></td>
</tr>
</table>
<font style='font-size:8pt' color=#797979>
<?=$row[addr1]?> <?=$row[size]?> <?=$row[price] ?></font>
</td>
<?
$cur_num--;
}
?>
</tr>
</table>
<?
$td_cnt = 0;
$td_max = 2; // 행수
while ($row = mysql_fetch_array($result))
{
if ($td_cnt == 0) echo ("<tr>");
?>
<td width=25% align='center'+ '+ ' valign='top' style='padding:10pt'>
<table border=0 cellpadding=8 cellspacing=0 style='border:#e1e1e1 1px solid;' bgcolor='#f8f8f8'>
<tr><td width=100 height=100 align=center><a href="view.php?page=<?=$page?>&id=<?=$row[id]?>"><img src="<?=$row[pic1] ?>" width=150 height=150 border=0></a></td>
</tr>
</table>
<font style='font-size:8pt' color=#797979>
<?=$row[addr1]?> <?=$row[size]?> <?=$row[price] ?></font>
</td>
<?
if ($td_cnt == $td_max) {
echo ("</tr>");
$td_cnt = 0;
}
else $td_cnt++;
$cur_num--;
}
if ($td_cnt < $td_max) echo ("</tr>");
?>
</table>