Home >Backend Development >PHP Tutorial >PHP basic tutorial strrpos function usage tutorial_PHP tutorial

PHP basic tutorial strrpos function usage tutorial_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:00:251061browse

strrpos has the same usage as strripos, let’s take a look below.

Definition and usage
The strrpos ( ) function determines whether find will appear in string.

This function succeeds if it exists, otherwise it returns FALSE.

strrpos Syntax

strrpos(string,find,start)
string: required. Specify string search


find: required. The specified string is found


start: optional. Specify where to start the search

Note: strrpos ( ) function is case sensitive

echo strrpos("Hello world!","wo");
?>
The output result is 6
Let’s look at another example.
echo strrpos("WWW.111CN.CN!","cn");
?>
The output is 0
Do you know why? Because the difference between strrpos and strripos is small. The difference between strrpos and strripos is whether it is case-sensitive.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445519.htmlTechArticlestrrpos has the same usage as strripos, let’s take a look below. Definition and usage The strrpos () function determines find Whether it will appear in the string. If this function exists successfully,...
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