strchr: 寻找第一个出现的字元 
strrpos: 寻找字串中某字元最后出现处 
strpos: 寻找字串中某字元最先出现处。 
strrchr: 取得某字元最后出现处起的字串。 
strstr: 传回字串中某字串开始处至结束的字串。

解决方案 »

  1.   

    if (strpos($a, $b) === false)
      //不包含
      

  2.   

    strpos
    <?php
    $mystring = 'abc';
    $findme   = 'a';
    $pos = strpos($mystring, $findme);// Note our use of ===.  Simply == would not work as expected
    // because the position of 'a' was the 0th (first) character.
    if ($pos === false) {
        echo "The string '$findme' was not found in the string '$mystring'";
    } else {
        echo "The string '$findme' was found in the string '$mystring'";
        echo " and exists at position $pos";
    }?>
      

  3.   

    晕~~结帖时出了问题,csdn这服务器怎么这样不好用呢
    给的分也丢了
    谢谢楼上的朋友
    下次补上,呵呵