Re: checking if any values in one array are in another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Blanchard wrote:
> [snip]
> Is there a single php function that will tell me if any values in one
> array
> are in another without looping through one of the arrays and doing
> in_array?
> [/snip]
> 
> You have read http://www.php.net/array right? 

rtm? thats for wimps ;-)

> http://www.php.net/manual/en/function.array-intersect-assoc.php

there is also:

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

for pure value intersection, and this:

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

for pure key intersection.
and then there are a host of similar funcs that use user defined callbacks to
perform the comparison for whether keys &/or are values are considered the
same.



> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux