[其它] php中判断字段中是否包含某个字符的方法
<?php $name = "w3zz.com"; $pan = "3"; $com= explode($pan,$name); if (count($com)>1): echo $name."中包含".$pan; else: echo $name."中没有包含".$pan; endif; ?> |
<?php $name = "w3zz.com"; $pan = "3"; $com= explode($pan,$name); if (count($com)>1): echo $name."中包含".$pan; else: echo $name."中没有包含".$pan; endif; ?> |