$find=array('or','and','not');
$text=array('jasvjasvor','asmasnand','tekjbdkcjbdsnot');
I have to check if text array contains any of the elements find has. I'm able to do this for single text but don't know how to do it for all texts
$counter=0;
foreach($find as $txt){
if (strstr($text[0], $txt)) {
$counter++;
}
If i use this technique i'll have to run foreach number of times. Is there any other way to do this?
NOTE if array value contains or,and ,not not the whole word match
http://codepad.viper-7.com/VKBMtP
Input
$find=array('or','and','not');
$text=array('jasvjasvor','asmasn','tekjbdkcjbdsnot');
// array values "jasvjasvor" and "tekjbdkcjbdsnot" contains words `or,not`
Output
2 -> as two words from find array are contained in text array values