php中判断一个字符串包含另一个字符串的方法_php技巧
程序员文章站
2024-02-16 23:48:40
...
$name = "001x.gif";
$pan = "x";
$con = explode($pan,$name);
if (count($con)>1):
echo $name."中包含".$pan;
else:
echo $name."中没有包含".$pan;
endif;
?>
$pan = "x";
$con = explode($pan,$name);
if (count($con)>1):
echo $name."中包含".$pan;
else:
echo $name."中没有包含".$pan;
endif;
?>