아

list.skin.php 파일에서......막혓어요 제목출력부분인데..

글쓰기에서 제목을 셀렉트박스루 값을받앗습니다.......

기본제목 출력 소스예요
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font color='#FF6600'><strong>{$list[$i][subject]}</strong></font>";
else
{
$style1 = $style2 = "";
if ($list[$i][icon_new]) // 최신글은 검정
$style1 = "color:#112222;";
if (!$list[$i][comment_cnt]) // 코멘트 없는것만 굵게
$style2 = "";
echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
}
echo "</a>";

if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";

// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

//echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
여기에 .........
셀렉트값 이적용되서 출력되게 할려묜 어케 해야될까요.....
<?
if($list[$i][subject]==1) echo "하이요";
elseif($list[$i][subject]==2) echo "방가워요";
elseif($list[$i][subject]==3) echo "안녕하세요";
else echo "인사맨트 없음";
?> 일케 쓰묜 출력은 됩니다 .......근데 제말은 위에 소스랑 합쳐서
코멘트 표시두 되게 하구 할려는뎅 ...기본지식이 달리다보니........
짜집기에는 자신잇었는뎅 막혀부렀어요 ...도와주세요

댓글 4개

if ($list[$i][comment_cnt])
$comment ="<span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span>";

<select name="subject" >
<option <?if ($list[$i][subject] == 1) echo "selected";?>>하이요 <?=$comment ?></option>
<option <?if ($list[$i][subject] == 2) echo "selected";?>>방가워요 <?=$comment ?></option>
<option <?if ($list[$i][subject] == 3) echo "selected";?>>안녕하세요 <?=$comment ?></option>
<option <?if (!$list[$i][subject]) echo "selected";?>>인사맨트없음 <?=$comment ?></option>
</select>
$subject_str=array( 1=>'Hi', 'Hello', 'How a u');

loop전에 해 주고 loop 안에서는

$list[$i][subject]= $subject_str[ $list[$i][subject] ];
저도 잘배우고 가요~
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
06-02-24 조회 1,606
06-02-24 조회 1,674
06-02-24 조회 1,536
06-02-24 조회 1,577
06-02-24 조회 1,644
06-02-24 조회 1,659
06-02-24 조회 1,697
06-02-24 조회 1,848
06-02-24 조회 1,708
06-02-24 조회 1,935
06-02-24 조회 1,523
06-02-23 조회 1,604
06-02-23 조회 1,617
06-02-23 조회 1,589
06-02-23 조회 1,607
06-02-23 조회 1,164
06-02-23 조회 1,808
06-02-23 조회 1,079
06-02-23 조회 1,616
06-02-23 조회 1,696