Home >Backend Development >PHP Tutorial >数组 array_sum()如何求不了总和

数组 array_sum()如何求不了总和

WBOY
WBOYOriginal
2016-06-13 10:35:55927browse

数组 array_sum()怎么求不了总和?
array_sum()求一个三维数组的总和,结果是0,$count的出来的结果是91125。求各位大神解释一下,谢谢。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> $count=0; $brr=array(); for($i=0;$i


------解决方案--------------------
array_sum不能直接用于多维数组之和吧
------解决方案--------------------
array_sum只针对一维数组,你那是多维数组啊
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn