PHP stristr() function (case-insensitive string search)_PHP tutorial

WBOY
Release: 2016-07-21 15:36:55
Original
1092 people have browsed it

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 code The code is as follows:

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

Output:

world!

Example 2
Copy code The code is as follows:

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

Output:

o world!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322021.htmlTechArticleIf the search is successful, return the rest of the string (from the matching point), if the string is not found, Returns false. Version support: PHP 3+ Syntax: stristr(string,find) Description...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!