![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数组处理
夏天的雪WXX
不断学习提升自己,哦耶!
展开
-
相同下标数组元素相加
$a = [ ['goods_id'=>2,'num'=>4], ['goods_id'=>2,'num'=>5], ['goods_id'=>4,'num'=>6], ['goods_id'=>4,'num'=>6], ['goods_id'=>4,'num'=>6]];$b = [];echo "<pre>"转载 2018-05-08 11:00:08 · 1428 阅读 · 0 评论 -
数组处理取值
/* *[循环遍历查看是否亮金星] * @author:wxx * @date:20180703 * */ public function brightstar($angryinfo){ $num=0; for($i=count($angryinfo)-1;$i>=0; $i--){ if($angryinfo[$i]==1){ $num+...原创 2018-07-04 17:29:03 · 898 阅读 · 0 评论