Home  >  Article  >  Backend Development  >  json string PHP stristr function case-insensitive string search

json string PHP stristr function case-insensitive string search

WBOY
WBOYOriginal
2016-07-29 08:42:581018browse

Returns the remainder of the string (from the matching point) if the lookup is successful, or false if the string is not found.
Version support: PHP 3+
Syntax:
stristr(string,find)
Description:
string required. Specifies the string to be searched for.
find required. Specifies the characters to search for. If the argument is a number, searches for characters that match the ASCII value for that number.
Tip:
This function is binary safe.
This function is not case sensitive. For case-sensitive searches, use strstr().
Example:
Example 1

Copy the code The code is as follows:


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


Output:
world !
Example 2

Copy the code The code is as follows:


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


Output:
o world!

The above introduces the case-insensitive string search of json string PHP stristr function, including the content of json string. I hope it will be helpful to friends who are interested in PHP tutorials.

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