Home > Backend Development > PHP Tutorial > php strpos usage example tutorial_PHP tutorial

php strpos usage example tutorial_PHP tutorial

WBOY
Release: 2016-07-20 11:00:17
Original
1502 people have browsed it

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)
Copy after login
Copy after login
Copy after login
		Parameter
Copy after login
Description
string 必选,
find 必需的。指定的查找字符串
start 可选,从哪里开始找
Description
string Required,
find Required. specified search string
start Optional, where to start
Copy after login
Copy after login

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

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

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...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template