我想检查$array
中是否存在$string
中的任何字符:
$array = array('â','à','á','ê','ô');
$string = 'hello every body';
答案 0 :(得分:0)
$found = false;
foreach ($array as $char){
//you can use strpos [without 'i'] for case-sensitive comparison
if (stripos($char,$string) !== false){
$found=true;
break;
}
}