is there a function out there to search in a array if it contains a part of a text just like the jquery(':contains')
and then return the index it is in :) here is an example to help you visualise it :)
$arr = array(
[0] => 'hello world',
[1] => 'foo',
[2] => 'bar',
);
$a = arr_contains('o',$arr); //returns array(1,0);
$b = arr_contains('fo',$arr);//return array(1);
$c = arr_contains('a',$arr);//return array(2);
$d = arr_contains('hello',$arr);//return array(0);
yinelemeli yapılabilir eğer bir artı olacaktır :)