Home  >  Article  >  Backend Development  >  Example of strpos usage in php_PHP tutorial

Example of strpos usage in php_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:36:531508browse

Definition and Usage
The strpos() function returns the position where the first occurrence occurs within a series of other strings.

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

Syntax

Copy code The code is as follows:

strpos(string,find,start)

Note: The strpos() function is case-sensitive.

Copy code The code is as follows:

echo strpos("Hello world!","wo ");
?>

Result: 6

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736842.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 Copy code The code is like...
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