Home  >  Article  >  php教程  >  php教程:stristr 函数实例教程

php教程:stristr 函数实例教程

WBOY
WBOYOriginal
2016-06-13 10:03:13972browse

php教程:stristr 函数实例教程

定义和用法
该stristr ( )函数搜索首次出现了一系列内部其他字串。

这个函数返回其余的字符串(从匹配点) ,或FALSE ,如果该字符串搜索没有发现。

语法

stristr(string,search)
string: 必选,查找指定的字符
search: 必需的。指定的字符串搜索。如果此参数是一个数字,它将寻求匹配的字符的ASCII值的数目
提示和说明注:此功能是二进制的安全。 注:此功能是区分大小写。为区分大小写的搜索,使用strstr ( ) 。

范例1

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


返回为.wordl!

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