Guys please help me figure out with php. In JS i know that i can use .some
or .includes
, but what is analog of doing it in PHP? I read the docs of php, they are very poor about functions for arrays.
I need to solve next problem:
['banana', 'apple', 'coconut']
i want to return true, if in array above contains any of values from this array ['apple']
, order of elements in given array must not matter!
How to solve this problem in php?