strpos — 查找字符串首次出现的位置
<?php $str = 'abcde'; $char = 'a'; if(strpos($str,$char) !== false){ echo '找到',$char; }else{ echo '没有找到',$char; } ?>
Powered By Cheug's Blog