$arr1 = array ("llo" "world", "ef", "gh" );
What s the best way to check if $str1
ends with some string from $arr1
?
The answer true/false is great, although knowing the number of $arr1 element as an answer (if true) would be great.
例:
$pos= check_end("world hello");//$pos=0; because ends with llo
$pos= check_end("hello world");//$pos=1; because ends with world.
是否比对<条码>所有内容进行对比更好/具体/专门的方法?