<tr><?for ($i=0; $i<count($list); $i++){ if ($i == 0) echo '<td width=0></td>'; else if ($i == 6) echo "</tr><tr><td width=1> </td>"; $title = get_text($list[$i][subject]); $title = cut_str($title, 28); $content = cut_str(get_text($list[$i][wr_content]), 80); $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]); if (!file_exists($img) || !$list[$i][file][0][file]) $img = "$latest_skin_path/img/no_image.gif"; $href = "$g4[bbs_path]/board.php?bo_table=$bo_table"; $list[$i]['href'] = "$h_page?no={$list[$i]['wr_id']}"; echo <<<HEREDOC <td valign='top'> <table border"0" align="left"> <tr> <td></td> </tr> <tr> <td> <div style='width:95px;height:auto;border:1px solid #CCCCCC;padding:2px'> <a href='{$list[$i]['href']}'><img src='{$img}' width='95' height='auto' border='0' align='absmiddle' title='$title'></a> </div> <td> <a href='{$list[$i]['href']}'><font color='#000000'><?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?></font></a></td> </tr> </table> </td>HEREDOC;}?></tr>
<?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?>
이부분 함수가 노출이 안되는데 왜 그럴까요?
답변 3개
<?php 문이 중복으로 사용되었고, echo 가 이미 위에서 사용되었기 때문에
<?php echo cut_str(strip_tags($list[$i]['wr_content']), 10); ?>
을
{$content}
로 변수만 출력해 주시면 됩니다.
$content = cut_str(get_text($list[$i][wr_content]), 80);
글자수를 조정하시려면 올려주신 소스 11라인의 위 코드에서 "80" 숫자를 조정하시면 됩니다.
kdw3104님, 답변을 채택해 주셔서 감사드립니다..!! ^^
이미 위에서 한번 처리를 한것 같은데..
echo $content 해보시구요...
사용상에 $content 이부분을 달리 표현할려고 한거면
strip_tags 이부분은 get_text 로 바꿔서 해보세요
답변을 작성하려면 로그인이 필요합니다.