내용출력 문의드립니다.
본문
while ($row = mysql_fetch_array($result)) {
for ($i = 1 ; $i <= $maxdate; $i++) {
if( substr($row[wr_link1],6,2) == $i ) {
switch ($row[wr_3]) {
default :
$html_day[$i].= "<br> <img src='$board_skin_path/img/dia_review.gif' border=0 align=absmiddle>";
}
$html_day[$i].= "<font style=font-weight:bold;><a href='$row[wr_link2]' target='_blank'>".$row[wr_subject]."</a></font></br>";
$html_day[$i].= " <font style=color:#CC0033;clear:both;font-size:11px;>".$row[wr_5]."</font></br>";
$html_day[$i].= " <font style=color:#CC0033;clear:both;font-size:11px;>".$row[wr_content]."</font></br>";
if($is_admin) $html_day[$i].= "<a href='./board.php?bo_table=$bo_table&wr_id=$row[wr_id]'>".수정."</a>";
위세 빨간줄친 소스보면요 내용출력이 되는 부분입니다.
저기에 체에디터로 첨부한 이미지만 나오고 본문 글짜는 안나오게하려면 어떻게 해야할까요
현제는 사진과 내용 모두 출력됩니다.
답변 2
// 에디터 이미지 얻기
function get_editor_image($contents, $view=true)
{
if(!$contents)
return false;
// $contents 중 img 태그 추출
if ($view)
$pattern = "/<img([^>]*)>/iS";
else
$pattern = "/<img[^>]*src=[\'\"]?([^>\'\"]+[^>\'\"]+)[\'\"]?[^>]*>/";
preg_match_all($pattern, $contents, $matchs);
return $matchs;
}
$html_day[$i].= " <font style=color:#CC0033;clear:both;font-size:11px;>".get_editor_image($row[wr_content], true)."</font></br>";
요렇게 해보세요.
그누 5에 있는 이미지만 추출하는 함수입니다.
!-->$html_day[$i].= " <font style=color:#CC0033;clear:both;font-size:11px;>".$row[wr_content]."</font></br>";
여기에 변수명을 적어주면되는건가요
제가 무지 해서 잘모르겠네요 ㅠㅠ