note 118445 deleted from function.array-intersect by cmb
| From: | cmb@php.net | Date: | Sun, 09 Feb 2020 08:28:43 +0000 |
| Subject: | note 118445 deleted from function.array-intersect by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214067@lists.php.net to get a copy of this message | ||
Note Submitter: juniorand at gmail dot com
----
If you just need confirmation that there intersection (and will not use the return of the
intersection). Just only returns a boolean.
<?php
function eventsCodeIntersect()
{
$eventsCod = array(211, 220, 244);
$eventsIntersect = array(220, 244);
return (bool) array_intersect($array1, $array2);
}
?>
In this case, the return is true.