테스트 사이트 - 개발 중인 베타 버전입니다

최신글(latest)사용시 가장 최신글이아닌 2번째 글이 불러지게 하는방법

· 12년 전 · 925 · 1
제목과 동일하게 최신글 예)
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace("&nbsp;"," ",$list[$i]['content']);


if($list[$i][file][0][file]) {
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' align=absmiddle width=\"150\" height=\"110\" style=\"border:0px solid #eeeeee;\">";
} else {
$file="";
}
?>
<td width="160" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" height="120" align="center" valign="top" style="padding-top:3px;" title="<?=$list[$i]['subject']?>"><a href="<?=$list[$i]['href']?>"><?=$file?></a></td>


</table>
</td>
<? if($i!=count($list)-1) { ?>
<td width="5"></td>
<? } ?>
<? } ?>
<? if (count($list) == 0) { ?>
<td height="72" align="center"><font color="#6A6A6A">게시물이 없습니다.</font></td>
<? } ?>
</tr>
</table>
가 있다면 가장 최신의 글이 아닌 2번째 부터 나오게 하는 방법을 가르쳐주세요

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

ㅌ만약 5개를 표시하려면 $i값 0~4까지 5개를 카운트 합니다.

For문안쪽에보면

$i 가 0부터 카운트시작하잔하요. 이게 첫번째 게시물이거든요

$i를 1부터 카운트하게하면 두번째 게시물부터 나옵니다.

게시글 목록

번호 제목
284438
284437
284435
284430
284420
284417
284409
284401
284399
284397
284380
284378
284371
284370
284366
284364
284360
284357
284355
284354