我想检查字符串是否存在于另一个字符串中
即使该字符串采用以下格式:are,ARE,Are,are,arE
$str = "how aRe you doing";
if (strpos($str,'are') !== false)
{
echo 'true';
}
使用stripos()
代替strpos()
。
int stripos(字符串$ main_string,字符串$ substring [,int $ offset = 0])
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句