dongyao2001
2017-05-24 13:36找到两个在数组中相等的值
$arr = array(
1, 1, 2, 3, 4
);
How to find out the pair from this array ?
Keep in mind that the pair from array could be any number (1,2,4,3,2) or (3,3,1,2,4); I just give an random example above.
if there is a pair in array
echo "The pair number is 1";
- 点赞
- 回答
- 收藏
- 复制链接分享
6条回答
为你推荐
- Java语言如何均匀将数组分为N等分,每个数组的和要求尽量相等,怎么实现呢
- 开发语言
- 2个回答
- PHP foreach循环,比较两个值
- loops
- foreach
- php
- 2个回答
- 如何使用for循环比较两个数组?
- for-loop
- arrays
- php
- 4个回答
- Foreach循环两个不相等的数组
- php
- 1个回答
- 如果另一个对象元素id数组具有相同的id,如何将新元素添加(更新)到对象数组中?
- arrays
- php
- 2个回答
换一换