Home > Backend Development > PHP Tutorial > strpos()第三个参数的具体用法,该怎么处理

strpos()第三个参数的具体用法,该怎么处理

WBOY
Release: 2016-06-13 13:38:13
Original
1483 people have browsed it

strpos()第三个参数的具体用法
目前在做字符串截取,为了让代码看起来更简化,有人给的提示是去看strpos的第三个参数,看文档看来看去例子只有第一个参数和第二个参数的。哪位高手写个简单的把3个参数都用进去的例子。感激不尽!!

------解决方案--------------------
官方手册上不有吗? http://www.php.net/manual/zh/function.strpos.php
------解决方案--------------------
第三个参数是偏移,默认为 0
如果指定,搜索将开始从字符串的这个位置开始

Related labels:
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