【函数功能】
该函数查找指定字符串在另一字符串中最后一次出现的位置(该函数大小写不敏感,若要区分大小写请查看strrpos()函数)。
	【函数语法】
strripos ($haystack, $needle, $offset = null)
	【参数说明】
$haystack:必需,被搜索的字符串。
$needle:必需,要查找的字符。
$offset:可选,在何处开始搜索。
	【演示程序】
<?php
       /**
         * strripos ($haystack, $needle, $offset = null)
         * **/
        $haystack = "Hello i am PHP!";
        echo strripos($haystack, "H");
        echo '<br>';
        var_dump(strripos($haystack, "h")) ;
        echo '<br>';
        echo strripos($haystack, "H",10);
?>
	【输出结果】
12
int(12) 
12
	【特别注意】
1.该函数对大小写不敏感。
2. 字符串位置从 0 开始,不是从 1 开始。
3.若没查找到指定字符串,则返回false。
4.PHP 版本:4+。
5.更新日志:自 PHP 5.0 起,$needle 参数可以是包含超过一个字符的字符串。在 PHP 5.0 中,新增了 $offset 参数。
	【原版定义】
/**
 * Find the position of the last occurrence of a case-insensitive substring in a string
 * @link http://www.php.net/manual/en/function.strripos.php
 * @param haystack string <p>
 * The string to search in.
 * </p>
 * @param needle string <p>
 * If needle is not a string, it is converted
 * to an integer and applied as the ordinal value of a character.
 * </p>
 * @param offset int[optional] <p>
 * If specified, search will start this number of characters counted from the
 * beginning of the string. If the value is negative, search will instead start
 * from that many characters from the end of the string, searching backwards.
 * </p>
 * @return int the position where the needle exists relative to the beginnning of
 * the haystack string (independent of search direction
 * or offset).
 * Also note that string positions start at 0, and not 1.
 * </p>
 * <p>
 * Returns false if the needle was not found.
 */
转载请注明出处:php1234.cn ,原文地址:http://www.php1234.cn/a/functions/2016/1018/98.html