Home > Backend Development > PHP Tutorial > PHP tutorial: stristr function example tutorial_PHP tutorial

PHP tutorial: stristr function example tutorial_PHP tutorial

WBOY
Release: 2016-07-13 16:58:52
Original
736 people have browsed it

php tutorial: stristr function example tutorial

Definition and usage
The stristr() function searches for the first occurrence of other strings within a series.

This function returns the rest of the string (from the matching point), or FALSE if the string search is not found.

Grammar

stristr(string,search)
string: required, search for the specified character
search: required. Search for the specified string. If this argument is a number, it will seek to match the number of ASCII values ​​for the character
Tips and Instructions NOTE: This feature is binary safe. Note: This feature is case sensitive. For case-sensitive searches, use strstr().

Example 1

echo stristr("Hello world!","WORLD");
?>


Returned as .wordl!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631368.htmlTechArticlephp tutorial: stristr function example tutorial definition and usage The stristr () function search appeared for the first time in a series of other internal words string. This function returns the rest of the string (from the matching point)...
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