게시판 리스트 클릭시 링크이동 채택완료
게시판 리스트에서 링크2번에 주소값을 넣어주면
리스트에서 제목클릭시 링크2 새창 주소로 이동하구요 링크2값이 없으면 그냥 내용이 보여지게 하고싶거든요
수정을 좀 했는데 링크주소값이 없어도 새창이 뜹니다.
어떻게 수정해야 링크 있을때만 링크로 이동될까요?
if ($list[$i][is_notice]) echo "{$list[$i][subject]}"; else echo "{$list[$i][subject]}"; if ($list[$i][comment_cnt]) echo " {$list[$i][comment_cnt]}";
수정좀 붙어넣을수 있게 알려주시면 정말 감사하겠습니다.
답변 2개
else echo "{$list[$i][subject]}"; --->수정
else if($list[$i][link][2]) echo "{$list[$i][subject]}";
else echo "{$list[$i][subject]}";
댓글을 작성하려면 로그인이 필요합니다.
</p><p> </p><p><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);">$list[$i][href] = (</span><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);">$list[$i][link2]</span><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);">)</span><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; line-height: 1.5;"> ? </span><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);">$list[$i][href]</span><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; line-height: 1.5;"></span><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; line-height: 1.5;"> : "javascript:;" ;</span></p><p><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; line-height: 1.5;"> </span></p><p><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);"> if ($list[$i][is_notice])</span><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);"> </span></p><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"> echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>"; </span><br style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"> else </span><br style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"> echo "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>"; </span><br style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"><br style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"> if ($list[$i][comment_cnt]) </span><br style="font-family: gulim, helvetica; line-height: 23.54400062561035px; background-color: rgb(255, 255, 255);"><p><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);"> echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";</span> </p><p><span style="font-family: gulim, helvetica; line-height: 23.54400062561035px; font-size: 12px; background-color: rgb(255, 255, 255);"> </span></p><p>
이렇게 하면 어떨까요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인