Heim >Backend-Entwicklung >PHP-Tutorial >嗯.像中奖同样的中bug
嗯...像中奖一样的中bug?
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->var_dump($sumArr['TRADE_CLOSED']);$sumValue = array_sum($sumArr);var_dump($sumArr);var_dump($sumArr['TRADE_CLOSED']);
$sumArr=Array('WAIT_SELLER_SEND_GOODS'=>8,'WAIT_BUYER_CONFIRM_GOODS' =>37,'WAIT_BUYER_PAY' =>2,'TRADE_CLOSED'=>50,);var_dump($sumArr['TRADE_CLOSED']);$sumValue = array_sum($sumArr);var_dump($sumArr);var_dump($sumArr['TRADE_CLOSED']);<br><font color="#e78608">------解决方案--------------------</font><br>
<?php $aa=3;$sumArr=Array('WAIT_SELLER_SEND_GOODS'=>8,'WAIT_BUYER_CONFIRM_GOODS' =>37,'WAIT_BUYER_PAY' =>2,'TRADE_CLOSED'=>&$aa,);var_dump($sumArr['TRADE_CLOSED']);$sumValue = array_sum($sumArr);var_dump($sumArr);var_dump($sumArr['TRADE_CLOSED']);<div class="clear"> </div>