Home  >  Article  >  Backend Development  >  php strpos usage example tutorial_PHP tutorial

php strpos usage example tutorial_PHP tutorial

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

Definition and usage
The strpos () function returns the position of the first occurrence of another string inside a series.

If the string is not found, this function returns FALSE.

Grammar

strpos(string,find,start)

		Parameter
Description
string 必选,
find 必需的。指定的查找字符串
start 可选,从哪里开始找
Description
string Required,
find Required. specified search string
start Optional, where to start


Tips and Instructions Note: The strpos ( ) function is case-sensitive. For example

<!--?phpecho strpos("Hello world!","wo");?-->
结出结果:6

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445523.htmlTechArticleDefinition and Usage The strpos() function returns the position that first appears within a series of other strings. If the string is not found, this function returns FALSE. Syntax strpos(stri...
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