Home
Sign Up
Sign In
ironman55's recent timeline updates
ironman55
V2EX member #284383, joined on 2018-01-19 13:34:26 +08:00
ironman55
提问
技术话题
好玩
工作信息
交易信息
城市相关
PHP 数组问题
1
PHP
•
ironman55
•
May 9, 2019
• Lastly replied by
jswh
24
»
More topics by ironman55
ironman55's recent replies
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
jswh
你的方法我看了下,虽然结果不是完全契合我的需要,但是只要微调就可以做到了,也非常非常非常感谢了!这种迭代的思路虽然看起来相对上面那个方法平民了一点,但是真的很巧妙了~再次非常感谢~谢谢啦
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
shiny
我试了下你的代码 差不多了 我还要再微调一下 十分感谢了!!!! 我比较好奇你的思路是怎么想的
我的最终结果:
array(1) {
["2019-04-19"]=>
array(1) {
["applovin_int"]=>
array(1) {
["AE"]=>
&array(1) {
["Installs"]=>
NULL
}
}
}
}
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
qcgzxw
是$a 和$b 的数量和内容是可变的,比如
$a = ['Date'],
$b = ['Income'],
$subject = ['Date'=>'2019-04-26','Media'=>'AAA','Geo'=>'CN','Num'=>105,'Income'=>111];
求出$res['2019-04-26']['Income'] = 111;
需要的是通用型,能根据问题改变,而自动产生需要的结果;
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
qcgzxw
需要的是一个通用的函数,能巧妙处理这个问题的,因为$a 和$b 的数量是可变的
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
ShundL
但是怎么生成多维数组呢
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
slgz
$a 其实相当于一个 group by,因为实际代码中还要在累加
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
@
oovveeaarr
怎么做到
Apr 26, 2019
Replied to a topic by
ironman55
›
PHP
›
PHP 数组问题
来人救命呀
»
More replies by ironman55
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
906 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms ·
UTC 20:46
·
PVG 04:46
·
LAX 13:46
·
JFK 16:46
♥ Do have faith in what you're doing.
❯