开发者

Find whats the same in two arrays

I have two arrays:

1)

Array ( 
    [0] =>开发者_开发知识库; 162 
    [1] => 163 
    [2] => 98 
    [3] => 13
)

2)

Array (
    [0] => 22
    [1] => 45
    [2] => 163
    [3] => 80
)

I want to find which values are the same in the these two arrays:

So that $thesame = 163 in this example

Thanks.


Try array_intersect() ...

http://uk3.php.net/manual/en/function.array-intersect.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜