You can use array_intersect()
.
$result = !empty(array_intersect($people, $criminals));
More Related Contents:
- PHP multidimensional array search by value
- How to sum all column values in multi-dimensional array?
- How to search by key=>value in a multidimensional array in PHP
- How to convert JSON string to array
- Modify array values in foreach loop
- How to check if PHP array is associative or sequential?
- What is the best way to loop through this array in PHP?
- mysqli bind_param() expected to be a reference, value given
- Build a tree from a flat array in PHP
- Cartesian Product of N arrays
- Convert a comma-delimited string into array of integers?
- Convert array into csv
- How to re-index the values of an array in PHP? [duplicate]
- Convert array of single-element arrays to a one-dimensional array
- Type hinting – specify an array of objects
- Convert an associative array to a simple array of its values in php
- Posting array from form
- CSV to Associative Array
- Check if a specific value exists at a specific key in any subarray of a multidimensional array
- How to pass an array via $_GET in php?
- How to get common values from two different arrays in PHP [closed]
- Comment associative array in PHP Documentor
- Get the maximum value from an element in a multidimensional array? [duplicate]
- Move an array element to a new index in PHP
- PHP get all arguments as array?
- Convert PHP array string into an array
- CMS Routing in MVC
- Best way to initialize (empty) array in PHP
- Recursive array_search
- Conditionally add associative element to array