고수님들 도와주세요 !! 정보
고수님들 도와주세요 !!
본문
<?
$icon_h =""; //출력부분 아이콘
$cnt = 1;
$row = sql_fetch(" SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ");
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
//카테고리별 게시물수 체크
$row1 = sql_fetch(" SELECT count(*) as cat_cnt FROM {$g4[write_prefix]}{$bo_table} WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ");
//출력부분 설정 여기 아래부분이요,,,
$str .= "<td style=''".$icon_h."<a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; } //줄바꿈 부분
$cnt++;
}
여기서 출력부분설정에서 td 안에 배경을 옇고 싶은데 어떻게 고쳐도 않되네요
스타일문제인지 ,,,background="<?=$g4['path']?>/images/line2.jpg" 이걸 옇고 싶은데 어떻게 하시면 될까요,,,고수님들 부탁해요 ~~~
$icon_h =""; //출력부분 아이콘
$cnt = 1;
$row = sql_fetch(" SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ");
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
//카테고리별 게시물수 체크
$row1 = sql_fetch(" SELECT count(*) as cat_cnt FROM {$g4[write_prefix]}{$bo_table} WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ");
//출력부분 설정 여기 아래부분이요,,,
$str .= "<td style=''".$icon_h."<a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; } //줄바꿈 부분
$cnt++;
}
여기서 출력부분설정에서 td 안에 배경을 옇고 싶은데 어떻게 고쳐도 않되네요
스타일문제인지 ,,,background="<?=$g4['path']?>/images/line2.jpg" 이걸 옇고 싶은데 어떻게 하시면 될까요,,,고수님들 부탁해요 ~~~
댓글 전체
$icon_h 로 지정되는 것이 이미 background 인거 같은데요...
style="background:url(<?=$g4['path']?>/images/line2.jpg) no-repeat;"
style="background:url(<?=$g4['path']?>/images/line2.jpg) no-repeat;"
일단 td 가로가 안닫혀 있네요.
$str .= "<td style=''".$icon_h."<a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
$str .= "<td style=''".$icon_h."><a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
이렇게 닫혀야 하겠고.
따옴표 때문에 문제가 되는게 아닐까요?
$str .= "<td style=''".$icon_h." background='<?=$g4[path]?>/images/line2.jpg'><a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
이렇게 작은따옴표로 바꿔보시면...
kesan님 말씀처럼 $icon_h 도 중간에 들어가는 내용이 없으니 kesan님이 적어주신 대로 하는게 더 맞겠네요. 대신 td 대괄호는 닫혀야겠죠 ^^
$str .= "<td style=''".$icon_h."<a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
$str .= "<td style=''".$icon_h."><a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
이렇게 닫혀야 하겠고.
따옴표 때문에 문제가 되는게 아닐까요?
$str .= "<td style=''".$icon_h." background='<?=$g4[path]?>/images/line2.jpg'><a href='$g4[path]/n/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'>$arr[$i]</a></td>";
이렇게 작은따옴표로 바꿔보시면...
kesan님 말씀처럼 $icon_h 도 중간에 들어가는 내용이 없으니 kesan님이 적어주신 대로 하는게 더 맞겠네요. 대신 td 대괄호는 닫혀야겠죠 ^^

두분다 감사합니다... background='$g4[path]/images/line2.jpg' $g4[path] 이것때문에 그러셧네요 <??>이거 없어야 하네요 ㅎㅎ 감사합니다^^
아 그렇네요. 그거 저도 미쳐못봤군요. 저도 가끔 실수하는데 위에 댓글에도 잘못 알려드렸네요.
죄송합니다. 해결하셔서 다행입니다.
전 몇일째 안풀리는 부분이 있어서 진도가 안나가네요 ㅜㅜ
죄송합니다. 해결하셔서 다행입니다.
전 몇일째 안풀리는 부분이 있어서 진도가 안나가네요 ㅜㅜ