我经常发现自己撰写的文章,例如:if($var=bob , Kluwer = pineven , Kluwer = jacode ){......
是否在营地安装了扫描仪,以检查一个var是否与任何经营者相匹配? 或者,我必须写一下我自己的职务:
function matches_any($question, $pos_answer, $pos_answer, $pos_answer, $pos_answer, ...){
// Call the function args, get the first one, get the rest, compare all the rest, return true if any match, return false by default.
}
因此:
if(matches_any($var, $bob, $steven, james , $william)){ ...