포인트 증감 차액을 계산하는 법?
본문
2014-11-05 16:56:39 | 수입 | 지출 | |
소계 출력 2,990 | +4,990 | -2,000 |
도메인/bbs/point.php 파일에서
붉은색 소스를 추가해 소계 출력 부분에 수입 지출을 더한 값 2,990을 넣고 싶은데, 안 되네요. 뭐가 잘 못된걸까요?
HEREDOC;}
if ($i == 0)
echo "<tr><td colspan=5 align=center height=100>자료가 없습니다.</td></tr>";
else {
if ($sum_point1 > 0)
$sum_point1 = "+" . number_format($sum_point1);
$sum_point2 = number_format($sum_point2);
$sum_point3 = $sum_point1 + $sum_point2;
$sum_point3 = number_format($sum_point3);
echo <<<HEREDOC
<tr height=25 bgcolor="#666666" align="center">
<td height="24" colspan=2 align=center><div class='point-sum'>소계{$sum_point3}</div></td>
<td align=right><div class='point-sum'>{$sum_point1}</div></td>
<td align=right><div class='point-sum'>{$sum_point2}</div></td>
</tr>
HEREDOC;