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

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

WBOY
Release: 2016-06-13 13:20:55
Original
974 people have browsed it

数组 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
Copy after login


------解决方案--------------------
array_sum不能直接用于多维数组之和吧
------解决方案--------------------
array_sum只针对一维数组,你那是多维数组啊
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template