|
Posted by Guy on 06/24/07 09:09
artev a écrit :
> two array
> A) 1, 2, 3, 4, 5, 6
> B) 4, 6, 9
>
> how can to have an array
> C) 4, 6
> all the B's values that have value in A
$C=array_intersect($A,$B)
>
> and
> an array
> D) 1, 2, 3, 4, 5, 6, 9
> a simple union of A + B with no duplicates values
$D=array_unique(array_merge($A,$B))
GR
>
[Back to original message]
|