Copy
<div class="box-title">공지사항<a class="noticemore" href="http://www.webshow.kr"><i class="fa fa-plus"></i></a></div> <ul> <? $notice_row = sql_fetch("select count(*) as cnt from wp_g5_write where bo_table='notice' order by wr_id desc"); $notice_count = $notice_row[cnt]; $notice_sql = "select * from wp_g5_write where bo_table='notice' order by wr_id desc"; $notice_result = sql_query($notice_sql); for($i=0;$notice_row=sql_fetch_array($notice_result);$i++){?> <li>[<?=date("y/m/d",strtotime($notice_row[wr_datetime]))?>] <a href="
이렇게 되서 게시물 최근글을 반복 추출하게 되어 있는데요.
for문이 무한반복되고 있어서
for($i=0;$notice_row=sql_fetch_array($notice_result);$i++){?>
조건부분에 < 5를 걸고 싶은데 어떻게 걸어야 하나요.ㅠ
|
답변 3개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.