strpos函数

简介:

定义和用法

strpos() f函数查找字符串在另一字符串中第一次出现的位置

语法

strpos(string,find,start)


参数解析

参数 描述
string 必需。规定要搜索的字符串。
find 必需。规定要查找的字符串。
start 可选。规定在何处开始搜索。

示例

<?php
    echo strpos("You love php, I love php too!","php");
?>

输出

9


本文转自 素颜猪 51CTO博客,原文链接:http://blog.51cto.com/suyanzhu/1896131


相关文章
|
PHP
str_replace() 和 strpos()
str_replace() 和 strpos()
90 0
str_replace() 和 strpos()
PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法
PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法
265 0
PHP 7.0.0中ereg_replace 函数使用preg_replace替换方法
reverse 函数 与 substring_index 函数
select reverse(substring_index(reverse(substring_index((select dept_name from department where dept_no=20862), '-', 2)), '-', ...
1077 0

热门文章

最新文章