数组获取所有符合值

array ( [5] => 5 [9] => 5 [3] => 4 [7] => 8 [4] => 10 [6] => 6 [1] => 7 [8] => 3 [2] => 8 [0] => 4 )

这个数组,怎么获取所有值 为5的 [5] => 5 [9] => 5也就是5和9

或者获取所有值为8的, [7] => 8 [2] => 8 也就是2和8

用什么函数 是所有,并非一两个!

回复讨论(解决方案)

Posted in 未分类