테스트 사이트 - 개발 중인 베타 버전입니다

최근 게시물 내용추출하기 질문요

· 14년 전 · 1669 · 4
최근 게시물 내용추출하기 질문요

echo <<<HEREDOC
<td width='{$width}' align='center' valign='top'><table cellspacing=0 cellpadding=0 border=0 align='center' width='{$img_width}'><tr>
<td align='center' valign='top' style='padding;5px'>{$thumfile}</td></tr><tr><td style='padding:5px; line-height:14px;' class='small'><a href='{$list[$i][href]}'>{$list[$i][subject]}</a><Br>내용 60자로 넣기 태그제외</font></td></tr></table>

최근 게시물에 내용부분을 60자로 넣을려고 해요.
그런데 저 소스는 <?=$view[wr_content]?> 이게 안먹히는것 같더라구요.
내용 60자로 넣기 태그제외 이부분에 어떤 소스를 넣으면 정상적으로 내용부분이 60자로 나올까요?

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 4개

{$list[$i][wr_content]}
{$list[$i][wr_content]} 이소스를 넣으면 이미지 파일까지 출력되네요.;;
텍스트만 출력할수 있는 방법은요?
이미지파일은 내용하고 관계없어요
이미지 안나오게 하려면 $thumfile 이 부분을 삭제하세요..
<?
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]); //아래3줄은태그제거
$wr_content = preg_replace("/&nbsp;/"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content = cut_str(get_text($wr_content), 200, '…');//글자수
?>

echo <<<HEREDOC
<td width='{$width}' align='center' valign='top'><table cellspacing=0 cellpadding=0 border=0 align='center' width='{$img_width}'><tr>
<td align='center' valign='top' style='padding;5px'>{$thumfile}</td></tr><tr><td style='padding:5px; line-height:14px;' class='small'><a href='{$list[$i][href]}'>{$wr_content}</a><Br>내용 60자로 넣기 태그제외</font></td></tr></table>

게시글 목록

번호 제목
284438
284437
284435
284430
284420
284417
284409
284401
284399
284397
284380
284378
284371
284370
284366
284364
284360
284357
284355
284354