Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 11:16:41
Original
1169 people have browsed it

 

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不同的是是否区别大小写.


source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!