我有以下数组,它是嵌套在更大数组中的一组数组:
Array
(
[0] => Array
(
[vote_for] => 15
)
[1] => Array
(
[vote_for] => 15
)
[2] => Array
(
[vote_for] => 15
)
[3] => Array
(
[vote_for] => 5
)
[4] => Array
(
[vote_for] => 5
)
[5] => Array
(
[vote_for] => 2
)
[6] => Array
(
[vote_for] => 2
)
[7] => Array
(
[vote_for] => 2
)
[8] => Array
(
[vote_for] => 2
)
[9] => Array
(
[vote_for] => 2
)
[10] => Array
(
[vote_for] => 2
)
[11] => Array
(
[vote_for] => 2
)
[12] => Array
(
[vote_for] => 2
)
[13] => Array
(
[vote_for] => 2
)
[14] => Array
(
[vote_for] => 2
)
)
我想在这个数组上做相当于 array_count_values 的操作,这样我得到15 => 3
,5 => 2
和2 => 10
. 我如何取消嵌套数组来做到这一点?