Is there a way of finding where arrays overlap? Like if I have...
array(1,2,3) and array(2,3,4)...they would overlap at array(2,3).
Could you do something like $array1 - $array2 = $array3. $overlap = $array1 - $array3; ??? Would that work, or can't you do that with arrays...
Logic behind above... (1,2,3) - (2,3,4) would produced (1) (hopefully). THen, (1,2,3) - (1) = overlap (2,3)
Else, is there another way?
Find where arrays overlap
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Find where arrays overlap
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
- Lord Le Brand
- Website Team
- Posts: 223
- Joined: 08 Sep 2006, 15:44
- Real name: Leroy
- Location: Parkstad, Limburg, the Netherlands (GMT+1) [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Re: Find where arrays overlap
Yes, I saw that, but I didn't think it could do what I was asking, but looking at it again, I think it can. Thank you!
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 34 guests