latest.skin.php 에서 number_format 구하기 정보
latest.skin.php 에서 number_format 구하기본문
wr_5가 금액 입니다.
최신글 스킨에서 5,000 이런식의 세자리에서 콤마 찍으려고 하는데요
number_format 요걸 어떻게 삽입해야 하는지
그냥
<?=number_format($list[$i][wr_5])?> 이렇게 하면 게시판리스트에서는 먹히던데
최신글에서는 안먹히네요
{$list[$i][wr_5]} 그냥 이렇게 하면 점이 안찍히지만 숫자는 보입니다.
최신글 스킨에서 5,000 이런식의 세자리에서 콤마 찍으려고 하는데요
number_format 요걸 어떻게 삽입해야 하는지
그냥
<?=number_format($list[$i][wr_5])?> 이렇게 하면 게시판리스트에서는 먹히던데
최신글에서는 안먹히네요
{$list[$i][wr_5]} 그냥 이렇게 하면 점이 안찍히지만 숫자는 보입니다.
댓글 전체

수정한 부분을 보이시면 빠른 답변을 얻으실 수 있습니다.
소스입니다.
=========================================================
?>
<table width=95% border=0 cellpadding='0' cellspacing='0' align='center'>
<?
for ($i=0; $i<count($list); $i++)
{
if($i % $cols == 0 || $i==0){echo "<tr>";} //테이블 열바꿈 관련
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
//이미지 없을때 표시할 이미지 설정
if (!file_exists($img) || !$list[$i][file][0][file])$img = "$latest_skin_path/img/noimage.gif";
echo <<<HEREDOC
<td valign='top' align='center'>
<table width="100%" border='0' cellpadding='5' cellspacing='0' align='center'>
<tr>
<td align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='{$imgwidth}' height='{$imgheight}' border='0' align='absmiddle' title='$title'></a>
</td>
</tr>
<tr>
<td align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><b>{$list[$i][wr_1]}</b></a><br>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}</a><br>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][wr_2]}평 <font color="#CA3608"><b>{$list[$i][wr_5]}</a>
</td>
</tr>
</table>
</td>
HEREDOC;
if($i%$cols == ($cols-1)&& $i>0){ echo "</tr>";} //테이블 열바꿈 관련
}
?>
</tr>
<tr><td colspan=<?=$cols;?> height=1></td></tr>
</table>
<? if (count($list) == 0) { ?><br><center>등록된 게시물이 없습니다.</center><br><? } ?>
============================================================
=========================================================
?>
<table width=95% border=0 cellpadding='0' cellspacing='0' align='center'>
<?
for ($i=0; $i<count($list); $i++)
{
if($i % $cols == 0 || $i==0){echo "<tr>";} //테이블 열바꿈 관련
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
//이미지 없을때 표시할 이미지 설정
if (!file_exists($img) || !$list[$i][file][0][file])$img = "$latest_skin_path/img/noimage.gif";
echo <<<HEREDOC
<td valign='top' align='center'>
<table width="100%" border='0' cellpadding='5' cellspacing='0' align='center'>
<tr>
<td align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='{$imgwidth}' height='{$imgheight}' border='0' align='absmiddle' title='$title'></a>
</td>
</tr>
<tr>
<td align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><b>{$list[$i][wr_1]}</b></a><br>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}</a><br>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][wr_2]}평 <font color="#CA3608"><b>{$list[$i][wr_5]}</a>
</td>
</tr>
</table>
</td>
HEREDOC;
if($i%$cols == ($cols-1)&& $i>0){ echo "</tr>";} //테이블 열바꿈 관련
}
?>
</tr>
<tr><td colspan=<?=$cols;?> height=1></td></tr>
</table>
<? if (count($list) == 0) { ?><br><center>등록된 게시물이 없습니다.</center><br><? } ?>
============================================================