我有一个类似下面的数组。我们需要从这个数组中创建三个数组。我们需要在另一个数组中为 facebook 和其他类似 twitter、电子邮件的东西分开。
这可能吗?
Array
(
[01] => Array
(
[facebook] => 375
[twitter] => 3276
[email] => 3276
)
[02] => Array
(
[facebook] => 385
[twitter] => 3326
[email] => 3326
)
[03] => Array
(
[facebook] => 391
[twitter] => 3327
[email] => 3327
)
[04] => Array
(
[facebook] => 446
[twitter] => 3327
[email] => 3327
)
[05] => Array
(
[facebook] => 486
[twitter] => 3334
[email] => 3334
)
[06] => Array
(
[facebook] => 2
[twitter] => 6
[email] => 6
)
[07] => Array
(
[facebook] => 1
[twitter] => 7
[email] => 7
)
[08] => Array
(
[facebook] => 3
[twitter] => 11
[email] => 11
)
[09] => Array
(
[facebook] => 0
[twitter] => 0
[email] => 0
)
[10] => Array
(
[facebook] => 0
[twitter] => 0
[email] => 0
)
[11] => Array
(
[facebook] => 0
[twitter] => 0
[email] => 0
)
[12] => Array
(
[facebook] => 0
[twitter] => 0
[email] => 0
)
)
我们三个都需要这样(脸书、推特、电子邮件)
Array(
[01]=>385,
[02]=>375,
[03]=>391,
[04]=>446,
[05]=>486,
[06]=>2,
[07]=>1,
[08]=>0,
[09]=>0,
[10]=>0,
[11]=>0,
[12]=>0,
}