Home  >  Article  >  php教程  >  php基础教程strrpos 函数 使用教程

php基础教程strrpos 函数 使用教程

WBOY
WBOYOriginal
2016-06-13 11:16:411133browse

 

strrpos 与 strripos用法相同的,下面我们来看看吧.

定义和用法
strrpos ( )函数判断 find是否会出现在string里面。

这个函数如果存在的成功,否则返回FALSE 。

strrpos 语法

strrpos(string,find,start)
string:必需。指定字符串搜索


find:所需。指定的字符串找到


start:可选。指定从何处开始搜寻

注: strrpos ( )函数是区分大小写

echo strrpos("Hello world!","wo");
?>
输出结果为6
再看一例子.
echo strrpos("WWW.111CN.CN!","cn");
?>
输出为0
知道为什么吗?因为strrpos区别大小小,它与strripos不同的是是否区别大小写.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn