【发布时间】:2014-10-13 13:17:26
【问题描述】:
我有一个包含许多值的数组,我想获得一个值是所有值的多个显示。像这样。
我的数组
$allValues = array(0,1,1); // i want to get 1, because two 1 vs one 0
// other example
$allValue = array(0,0,0,1,1); // I want to get 0, because three 0 vs two 1
// other example
$allValues = array(0,1); // I want to get 0, because one 0 vs one 1 is 50:50 but 0 is first value
对不起,我的英语不好。
【问题讨论】:
-
寻找数组的模式 - 看起来像stackoverflow.com/a/12036174/2708970。
-
非常清楚地解释了问题和要求,但没有努力:)