我最近将我的网站移至 Blue Host,这个功能是循环的一部分:
if ($InvoiceType == '18')
{
echo 'Sum Before addition = ' . $sumInvoice . '<br/>';
$sumInvoice += $complete[$key][5];
print 'Invoice being added = ' . $complete[$key][5] . '<br/>'
. 'Sum after addition = '. $sumInvoice . '<br/>';
}
正在返回这个:
Sum Before addition = 0
Invoice being added = 15174.20
Sum after addition = 1
Sum Before addition = 1
Invoice being added = 4604.25
Sum after addition = 5
Sum Before addition = 5
Invoice being added = 63810.83
Sum after addition = 11
$complete 转储:
Array
(
[0] => Array
(
[0] => 2161
[1] => 638697
[2] => CLIV0286
[3] => Central Medical Supply Inc.
[4] => 0.00
[5] => 15174.20
[6] => 04/01/2011
[7] => 2/1-2/28/11 Fairlawn
[8] => PM2
[9] => 18
)
[1] => Array
(
[0] => 2161
[1] => 638698
[2] => CLIV0286
[3] => Central Medical Supply Inc.
[4] => 0.00
[5] => 4604.25
[6] => 04/01/2011
[7] => 2/1-2/28/11 Atrium
[8] => PM2
[9] => 18
)
[2] => Array
(
[0] => 2161
[1] => 638699
[2] => CLIV0286
[3] => Central Medical Supply Inc.
[4] => 0.00
[5] => 63810.83
[6] => 04/01/2011
[7] => 2/1-2/28/11 Parsippany
[8] => PM2
[9] => 18
)
)
我究竟做错了什么?